But I want to have iconengines in plugins directory. So what should I do ?
But I want to have iconengines in plugins directory. So what should I do ?
Read my post above. The directory name (or path) where the "iconengines" directory is located doesn't matter. All that matters is the existance of "iconengines" directory in one of the directories in the library search path.
Short answer: you can't.
Long answer: Take a look at QCoreApplication sources. Plugins are loaded from within there. Maybe you can load the plugin yourself from a custom location.
Medium answer: compile the plugin statically into your application (see "static plugins" in the docs).
Ok I did read your post above. And I totaly agree with you. I was wondering why
C:\Tmp\plugins\iconengines\qsvg4.dll
could not be loaded when "custom" path is added this custom path is
C:\Tmp\plugins
by QCoreApplication::addLibraryPath(... +QString("\plugins");
and it is working for anything else like
C:\Tmp\plugin\iconengines\qsvg4.dll
and QCoreApplication::addLibraryPath(... +QString("\plugin"); in code.
I don't see in QCoreApplication code why custom path can not be in C:\Tmp\plugins.
I know that it does not matter where iconengines is until it is in library search path - but it is in this path. I just wondering why it is not working. I am using this approach to have plugins in one direcotry (generaly for sqldrivers) in two other projects and it works.
Bookmarks