c++ - 如何指定树莓派上QT图形输出的设备?
PHP中文网
PHP中文网 2017-04-17 13:34:47
0
2
788

我想用一块tft屏幕连接在树莓派上显示一些运行相关的数据,目前会一些QT程序的开发。我想问下,在不跑桌面(startx,因为没有那么多资源给它用)的情况下能直接通过ssh启动程序使屏幕上直接显示qt的界面吗?
我在网上看到linux有个缓冲帧流fb*的东西,不知道能不能让qt直接把图形数据给他写入到那里边。。。。。

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
大家讲道理

Answer for yourself
It has been solved. Qt supports direct output to the Framebuffer device. Just set it in the environment variable

QT_QPA_PLATFORM=linuxfb:/dev/fb*

That’s it, then just pay attention to the resolution when developing

巴扎黑

If you want to display the qt interface, you must have the x server. Without this startx, the graphical interface should not be displayed. .
If it is a terminal, it is ok. As long as the system is started and the sshd service is started, the screen will be fine if it is not. Just connect directly with ssh. .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template