Icons used by a Qt library doesn't show when linked to a Qt app
-
Sorry but the title is too vague (I can't think of another title)
I created a Qt library based on QWidget. The library doesn't have any errors when compiled (either static or dll).
When I used this library on an application, it doesn't produced any errors but the "icons" that supposedly be there are not shown.
Isn't it that any resources (.qrc) like icons and files added to a Qt app will be embedded into the exe and and will not be needed as external files when deployed to other PC?
but how about libraries like .dll and .lib? can they do the same?
-
I thing that your library need a plugin for jpg/gif/svg.
-
I also built my library in "static" mode so I don't think I will be needing the plugin. Even so, "static" or "DLL" results in the same output.
-
I found similar links:
"qtcentre":http://www.qtcentre.org/archive/index.php/t-15590.html
"qtforum":http://www.qtforum.org/article/19406/resources-in-a-dynamic-library.html?s=b2aa893ddcdc1585386064185cc1e4e31b4be99a#post73670
"qt-project":http://qt-project.org/forums/viewthread/18539Yes! It is a Resource-Only DLL!
-
Are you using the same path to the resources in other places? Try putting them into a directory "/mylibname/".
Having libs/plugins with their own resources works fine: Almost all plugins in creator have their own resource file.