qt 支持双屏显示,网上应该是一大堆,你可以随便百度!
但是关于qt5 支持双屏幕显示的资料甚少, 现将其记录下来:
让我们引用一段经典的文章吧:
Multiple screens
When having multiple displays connected (e.g. the touch LCD panel and HDMI), there are two framebuffer devices: /dev/fb0 and /dev/fb2. Note that fb1 and fb3 are overlays for fb0 and fb2 and are not useful for our purposes here.
Both eglfs and linuxfb uses /dev/fb0 by default. To change this, linuxfb can be configued with the 'fb' parameter: just launch the application with "-platform linuxfb:fb=/dev/fb2".
eglfs has no way to configure this before 5.3.0 so apps using eglfs will always show up on the display belonging to fb0. In 5.3.0 a new environment variable is introduced: QT_QPA_EGLFS_FB. Setting this to /dev/fb2 before launching the app will make the EGL/GLES content show up on the second display.Update: It might be possible to launch eglfs apps
这篇博客详细介绍了在Linux环境下,如何利用Qt5实现双屏显示。内容包括Qt5针对多屏幕的支持情况,如何配置linuxfb和eglfs以指定显示设备,以及在5.3.0版本中引入的新环境变量QT_QPA_EGLFS_FB的应用。虽然无法在同一应用上显示多个屏幕内容,但可以通过启动两个独立应用并使用IPC通信作为解决方案。
最低0.47元/天 解锁文章
1572

被折叠的 条评论
为什么被折叠?



