Solved Qt Resource images not showing while executing
-
I'm also facing the issue of resource images not visible when the app is running. I have a plugin-based architecture. Lets say,
- NavControls, a staticLib, in which we have the icons on buttons.
- The NavControls.lib is used by a Plugin (VIEWERSHARED_EXPORT). I added it in the .pro of the Viewer Plugin
//win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Deploy/bin/release/ -lNavControls else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Deploy/bin/debug/ -lNavControls INCLUDEPATH += $$PWD/../NavControls DEPENDPATH += $$PWD/../NavControls
- This Viewer plugin implements an Interface.
- Finally, I load the plugin in the app, by QPluginLoader class..
The plugin loads without any warnings, but the images are missing on the navControl's buttons.
Please suggest what I'm missing!!
Thanks,
Sayan -
Hi,
As already answered in this thread:
You likely missed the Using Resources in a Library part of the
The Qt Resource System
chapter in Qt's documentation. -
@SGaist Thanks for the suggestion.
Sorry for the very delayed reply.
I tried few options as in the mentioned link.
Adding the qrc path in the application's pro file worked.Thank you!!