linux+qt+分屏显示界面,Qt5支持双屏显示

这篇博客详细介绍了在Linux环境下,如何利用Qt5实现双屏显示。内容包括Qt5针对多屏幕的支持情况,如何配置linuxfb和eglfs以指定显示设备,以及在5.3.0版本中引入的新环境变量QT_QPA_EGLFS_FB的应用。虽然无法在同一应用上显示多个屏幕内容,但可以通过启动两个独立应用并使用IPC通信作为解决方案。
摘要由CSDN通过智能技术生成

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

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值