White screen - yocto with QT
-
I have deployed a simple qt application that has a label prints "hello world" in yocto image and when trying to open the application on target it shows a white screen with no labels inside it .
but when running the application in host machine it works fine.
i have removed
x11
andwayland
from the destro features and addedeglfs
to it.the recipe for qt app :
SUMMARY = "QT Example Recipe" LICENSE = "CLOSED" SRC_URI = "file://qt-app.pro \ file://qt-app.cpp" DEPENDS += " qtbase" RDEPENDS_${PN} += " qtwayland" S = "${WORKDIR}" do_install:append() { install -d ${D}${bindir} install -m 0755 ${S}/build/qt-app ${D}${bindir} } FILES_${PN} += "${bindir}/qt-app" inherit qmake5
and the source code of the program :
#include <QApplication> #include <QLabel> #include <QWidget> #include <QDebug> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel label("Hello World!"); label.setWindowTitle("My First Qt App"); label.setAlignment(Qt::AlignCenter); label.resize(400, 400); label.show(); return app.exec(); }
i have also appended
export QT_QPA_PLATFORM=eglfs
to/etc/profile
file.can any one help me with the white screen issue?
-
@LogEx okay it seems that you did not deployed all qt plugins properly to the yocto image.Moreover, something is not working well with the platform plugin. anyway i advice you to:
1-remove your receipe
2- Add all qt modules in your local conf, remove x11 and wayland in distro features
3- in meta-qt receipe, add the support for eglfs in qtbase.bbapend
4-Build a core sato image and the toolchain again
5-Now create a program and deploy it again
6-Launch your program with eglfs to check
7-Add your custom receipe and try againps: i will advice you to always inherit gui projet from a window.Because if you are using label.show() , and there is no suitable window manager to handle it it will have weirds results.This is my opinion.
i am also running yocto and i don't have any problem with it
@Ronel_qtmaster
the problem was with fonts.
I have added these fonts to the image and now it works fine.IMAGE_INSTALL_append = "\ ttf-dejavu-sans \ ttf-dejavu-sans-mono \ ttf-dejavu-sans-condensed \ ttf-dejavu-serif \ ttf-dejavu-serif-condensed \ ttf-dejavu-common \ "
-
I have deployed a simple qt application that has a label prints "hello world" in yocto image and when trying to open the application on target it shows a white screen with no labels inside it .
but when running the application in host machine it works fine.
i have removed
x11
andwayland
from the destro features and addedeglfs
to it.the recipe for qt app :
SUMMARY = "QT Example Recipe" LICENSE = "CLOSED" SRC_URI = "file://qt-app.pro \ file://qt-app.cpp" DEPENDS += " qtbase" RDEPENDS_${PN} += " qtwayland" S = "${WORKDIR}" do_install:append() { install -d ${D}${bindir} install -m 0755 ${S}/build/qt-app ${D}${bindir} } FILES_${PN} += "${bindir}/qt-app" inherit qmake5
and the source code of the program :
#include <QApplication> #include <QLabel> #include <QWidget> #include <QDebug> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel label("Hello World!"); label.setWindowTitle("My First Qt App"); label.setAlignment(Qt::AlignCenter); label.resize(400, 400); label.show(); return app.exec(); }
i have also appended
export QT_QPA_PLATFORM=eglfs
to/etc/profile
file.can any one help me with the white screen issue?
-
@LogEx likely some plugins are missing:
export QT_DEBUG_PLUGINS=1
run your app again to see what is missing.@JoeCFD thanks for your reply
after trying this, the output log in the terminal is:QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqeglfs.so" Found metadata in lib /usr/lib/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqminimal.so" Found metadata in lib /usr/lib/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqminimalegl.so" Found metadata in lib /usr/lib/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqoffscreen.so" Found metadata in lib /usr/lib/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqvnc.so" Found metadata in lib /usr/lib/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... loaded library "/usr/lib/plugins/platforms/libqeglfs.so" QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/egldeviceintegrations" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/egldeviceintegrations/libqeglfs-emu-integration.so" Found metadata in lib /usr/lib/plugins/egldeviceintegrations/libqeglfs-emu-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_emu" ] }, "archreq": 0, "className": "QEglFSEmulatorIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs_emu") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so" Found metadata in lib /usr/lib/plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_kms_egldevice" ] }, "archreq": 0, "className": "QEglFSKmsEglDeviceIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs_kms_egldevice") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/egldeviceintegrations/libqeglfs-kms-integration.so" Found metadata in lib /usr/lib/plugins/egldeviceintegrations/libqeglfs-kms-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_kms" ] }, "archreq": 0, "className": "QEglFSKmsGbmIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs_kms") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/egldeviceintegrations" ... loaded library "/usr/lib/plugins/egldeviceintegrations/libqeglfs-kms-integration.so" QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/imageformats" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/imageformats/libqjpeg.so" Found metadata in lib /usr/lib/plugins/imageformats/libqjpeg.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "jpg", "jpeg" ], "MimeTypes": [ "image/jpeg", "image/jpeg" ] }, "archreq": 0, "className": "QJpegPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("jpg", "jpeg") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/imageformats" ... loaded library "/usr/lib/plugins/imageformats/libqjpeg.so" QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/accessiblebridge" ... QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/accessiblebridge" ...
-
@JoeCFD thanks for your reply
after trying this, the output log in the terminal is:QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqeglfs.so" Found metadata in lib /usr/lib/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqminimal.so" Found metadata in lib /usr/lib/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqminimalegl.so" Found metadata in lib /usr/lib/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqoffscreen.so" Found metadata in lib /usr/lib/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqvnc.so" Found metadata in lib /usr/lib/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... loaded library "/usr/lib/plugins/platforms/libqeglfs.so" QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/egldeviceintegrations" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/egldeviceintegrations/libqeglfs-emu-integration.so" Found metadata in lib /usr/lib/plugins/egldeviceintegrations/libqeglfs-emu-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_emu" ] }, "archreq": 0, "className": "QEglFSEmulatorIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs_emu") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so" Found metadata in lib /usr/lib/plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_kms_egldevice" ] }, "archreq": 0, "className": "QEglFSKmsEglDeviceIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs_kms_egldevice") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/egldeviceintegrations/libqeglfs-kms-integration.so" Found metadata in lib /usr/lib/plugins/egldeviceintegrations/libqeglfs-kms-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_kms" ] }, "archreq": 0, "className": "QEglFSKmsGbmIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs_kms") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/egldeviceintegrations" ... loaded library "/usr/lib/plugins/egldeviceintegrations/libqeglfs-kms-integration.so" QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/imageformats" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/imageformats/libqjpeg.so" Found metadata in lib /usr/lib/plugins/imageformats/libqjpeg.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "jpg", "jpeg" ], "MimeTypes": [ "image/jpeg", "image/jpeg" ] }, "archreq": 0, "className": "QJpegPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("jpg", "jpeg") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/imageformats" ... loaded library "/usr/lib/plugins/imageformats/libqjpeg.so" QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/accessiblebridge" ... QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/accessiblebridge" ...
-
@LogEx try to run the app from the target board with eglfs or x11 and upload a screenshot
-
@Ronel_qtmaster

May be it is a problem with fonts ? -
@Ronel_qtmaster

May be it is a problem with fonts ? -
@Ronel_qtmaster
thanks for your reply
thats what is shown when trying the label "hello world"
the push button is shown but with no text on it just the text place indentation
i have alos tried a check box but it is not showing, only the text indentation shows
here is alos screenshots for the program behavior on my host machine
the label :
the button :
the check box:
-
@Ronel_qtmaster
thanks for your reply
thats what is shown when trying the label "hello world"
the push button is shown but with no text on it just the text place indentation
i have alos tried a check box but it is not showing, only the text indentation shows
here is alos screenshots for the program behavior on my host machine
the label :
the button :
the check box:
@LogEx okay it seems that you did not deployed all qt plugins properly to the yocto image.Moreover, something is not working well with the platform plugin. anyway i advice you to:
1-remove your receipe
2- Add all qt modules in your local conf, remove x11 and wayland in distro features
3- in meta-qt receipe, add the support for eglfs in qtbase.bbapend
4-Build a core sato image and the toolchain again
5-Now create a program and deploy it again
6-Launch your program with eglfs to check
7-Add your custom receipe and try againps: i will advice you to always inherit gui projet from a window.Because if you are using label.show() , and there is no suitable window manager to handle it it will have weirds results.This is my opinion.
i am also running yocto and i don't have any problem with it
-
@LogEx okay it seems that you did not deployed all qt plugins properly to the yocto image.Moreover, something is not working well with the platform plugin. anyway i advice you to:
1-remove your receipe
2- Add all qt modules in your local conf, remove x11 and wayland in distro features
3- in meta-qt receipe, add the support for eglfs in qtbase.bbapend
4-Build a core sato image and the toolchain again
5-Now create a program and deploy it again
6-Launch your program with eglfs to check
7-Add your custom receipe and try againps: i will advice you to always inherit gui projet from a window.Because if you are using label.show() , and there is no suitable window manager to handle it it will have weirds results.This is my opinion.
i am also running yocto and i don't have any problem with it
@Ronel_qtmaster
the problem was with fonts.
I have added these fonts to the image and now it works fine.IMAGE_INSTALL_append = "\ ttf-dejavu-sans \ ttf-dejavu-sans-mono \ ttf-dejavu-sans-condensed \ ttf-dejavu-serif \ ttf-dejavu-serif-condensed \ ttf-dejavu-common \ "
-
-
@Ronel_qtmaster
the problem was with fonts.
I have added these fonts to the image and now it works fine.IMAGE_INSTALL_append = "\ ttf-dejavu-sans \ ttf-dejavu-sans-mono \ ttf-dejavu-sans-condensed \ ttf-dejavu-serif \ ttf-dejavu-serif-condensed \ ttf-dejavu-common \ "
@LogEx good to hear that.I had problems with fonts while crosscompilling for rpi.However with yocto fonts are deployed successfully.
-
@LogEx good to hear that.I had problems with fonts while crosscompilling for rpi.However with yocto fonts are deployed successfully.
@Ronel_qtmaster Yes i am using rpi too.
could you provide me with some resources to learn about plugins and qt application depends and real time depends ? -
@Ronel_qtmaster Yes i am using rpi too.
could you provide me with some resources to learn about plugins and qt application depends and real time depends ?