How to build qrc resources into static library?
-
Hi,
when I call a function belong to a static library, I found the image which is added to the static library return a null image.
After moving the .qrc file and all the image files to the application project, the image was correct finally.qDebug() << QImage(":/res/picture/status_red.png");Is there any way to build qrc resources into static library? rather than copy the resource file to another project.
Thank you.
-
Hi
Did you try with
https://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
"The Q_INIT_RESOURCE() macro is necessary on some platforms for resources stored in a static library."
as stated here
https://doc.qt.io/qt-5/resources.html -
Hi
Did you try with
https://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
"The Q_INIT_RESOURCE() macro is necessary on some platforms for resources stored in a static library."
as stated here
https://doc.qt.io/qt-5/resources.html