Making my yocto image able to compile my qt project
-
Is this coming from your own files ?
Does your image contain all the QtQuick stuff you are using ? -
@SGaist What do you mean by your own files ? If it's about the qml : action error, yes I think it's from my files. In fact, I have an action called imageTest, and it requires a file which is registered in my qrc files and the way to get it is by using the qrc path ("qrc:/myfile.png"). I think that the qml is not able to use this qrc path on the yocto image side and that's why it is saying that the Component is not ready. ( correct me if I'm wrong)
And about QtQuick, do you have a list of all the qtquick package that we can install ?For the moment, I have included qtquicontrols2 in my recipe with qtquickcontrols2 and qtquickcontrols2-mkspecs in my RDEPENDS flag.
Thanks again !
-
No I don't have such a list.
What I would do is to check that you build all the Qt modules that are related to your QT += entries.
qrc paths should just work because these files are built in your executable.
-
@SGaist Thanks for your support again,will try it out today and then come back here asap
Edit : I'm using QT += qml quick gui in my .pro, what should I include on the yocto side ? (more than what I actually have in my DEPENDS : qtbase qtdeclarative qtquickcontrols2) . Also, here is my RDEPENDS :
RDEPENDS_${PN} += "
qtvirtualkeyboard
gstreamer1.0-plugins-base
gstreamer1.0-plugins-good
qtquickcontrols2
qtquickcontrols2-mkspecs
qtquickcontrols2-qmlplugins
"Thanks !
-
EDIT: Problem is solved, I was missing the qtmultimedia package. Now I have this error (hope to be the last one : QML Image : Cannot open : qrc:/image/test.jpg) whereas I have the qrc file which include this jpg file ...
EDIT(2) : All my files are now well found by the app, it was a problem of relative path. Now I need to fix the : qt.qpa.xcb : xcb_shm_create_segment() failed for size 1228800 error and it will finally run I wish...
After running gdb on my apps, it seems to be a problem linked with Qt and OpenGL ( I have the segmentation fault coming from : QOpenGLContext::shareGroup() const () from /usr/lib/libQt5Gui.so.5)
-
@kmarconi said in Making my yocto image able to compile my qt project:
QML Image : Cannot open : qrc:/image/test.jpg
Could it be possible your yocto image is missing the Qt Image plugins?
You should deploy the JPG plugin at least to your device from the <Qt_installation_folder>/plugins/imageformats folder -
Hi, thanks for your reply . Yeah I was missing the Qtmultimedia package but also some my path in my qrc files were wrong.
I'm now working on the segmentation fault : qt.qpa.xcb : xcb_shm_create_segment() failed for size 1228800 which I have everytime I launch my app ... As I said in my earlier message, after running gdb on my apps, it seems to be a problem linked with Qt and OpenGL ( I have the segmentation fault coming from : QOpenGLContext::shareGroup() const () from /usr/lib/libQt5Gui.so.5)
-
Is there anything in your Yocto recipe to manage the OpenGL setup of your device ?
-
@SGaist I don't think so but in the meantime I don't see any package which could do it. My board support OpenGl ES2 so I tried some stuff like adding "PACKAGE CONFIG += "gles2" " to my qtbase bb file but nothing has changed ...
Also tried to add PACKAGECONFIG_append_pn-qtbase = "gles2" in my local.conf but no change.
After some googling, I found that the error was printed by this code : https://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/xcb/qxcbbackingstore.cpp?h=dev (line 371)
Edit: Closing this issue, it was a problem of platform (by default it was using x11 which is not the one used by my embedded device) . Thanks a lot for your help again !