Im developing a static library, and I use a qrc file. I read the documentation and found, that I have to call Q_ INIT _RESOURCE to make it work, but no success so far.. I called Q_ INIT _RESOURCE in main, directly after creating the QApplication (I tried different places too, such as directly before accessing it etc.); No namespace; The ressource file is added to the Project file of the library, The documentation ( http://doc.qt.io/qt-5/resources.html and https://wiki.qt.io/QtResources) suggests to call Q_INIT_RESOURCE (name) from main to trigger loading of library resources. This works fine for static libraries. For shared libraries however, it generates a linker error (unresolved external symbol).
error : QT_INIT_METAOBJECT does not name a type; did you mean Q_ INIT _RESOURCE? This topic has been deleted. Only users with topic management privileges can see it.
3/5/2008 · Q_ init _resource If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.
The resource files listed in the .qrc file are files that are part of the application’s source tree. The specified paths are relative to the directory containing the .qrc file. Note that the listed resource files must be located in the same directory as the .qrc file, or one of its subdirectories.. Resource data can either be compiled into the binary and thus accessed immediately in …
Q_INIT_RESOURCE (xits); The text was updated successfully, but these errors were encountered: jkriege2 added a commit that referenced this issue Jun 28, 2020, Use the Q_INIT_RESOURCE () macro in your application if the plugin ships qrc files. Link your application with your plugin library using LIBS in the .pro file. See the Plug & Paint example and the associated Basic Tools plugin for details on how to do this.
Our project tree looks roughly like this, but we don’t have a CMakeLists.txt in what corresponds to your ‘main’; we just do (exe/CMakeLists.txt): qt4_add_resources(resSources ../main/icons.qrc) add_executable(… ${resSources}) If you also have sources in ‘main’ that you are trying to compile into a static library (containing the resources), then you probably need Q_INIT_RESOURCE , as you …
This is a temporary bug in the Qt 5.5 branch. To fix it with the current 5.5 snapshots, add this to your main() function: Q_INIT_RESOURCE (qtmultimediaquicktools); The issue is already fixed in the current 5.5 branch of Qt, find the fix here or wait for the next snapshot….
Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share