QT eglfs 多屏支持,以及配置分辨率
QT eglfs 多屏支持,以及配置分辨率
QT官方参考链接:https://doc.qt.io/qt-5/embedded-linux.html
其他参考链接:https://www.cnblogs.com/hankfu/p/15323641.html
设置QT运行时环境变量
export QT_QPA_PLATFORM="eglfs"
# export QT_QPA_EGLFS_KMS_ATOMIC=1
# export QT_QPA_EGLFS_INTEGRATION="eglfs_kms"
# export QT_QPA_EGLFS_DEBUG="1"
# export QT_QPA_EGLFS_FORCE888=1
export QT_QPA_EGLFS_KMS_CONFIG="/etc/eglfs_kms.conf"
实现多屏支持,主要由QT_QPA_EGLFS_KMS_CONFIG
该环境变量指定的配置文件eglfs_kms.conf
控制;
创建配置文件/etc/eglfs_kms.conf。
{
"device": "/dev/dri/card0",
"hwcursor": false,
"pbuffers": true,
"outputs": [
{
"name": "VGA1",
"mode": "off"
},
{
"name": "HDMI1",
"mode": "1024x768"
}
]
}
启动QT应用程序。
/usr/bin/xxxapp