Try creating a "qt.conf" file (in the same directory where your executable) is with following contents:[Paths]
Plugins = plugins
Try creating a "qt.conf" file (in the same directory where your executable) is with following contents:[Paths]
Plugins = plugins
This did not fix the problem. I believe this file is used for loading of QtPlugins (ie. plugins that are built into QT). Either way that doesn't seem to be the problem.
Thanks for the reply. Much appreciated.
I'm going to try to install the dotNet framework and see if this fixes the problem at least. It'd be at least better than not knowing what is missing on a system for this to not work. I don't get why SP1 and SP2 seem to fix the problem. And how can i distribute this app.
I had the same problem on Windows when using the qsqlite.dll sqldrivers plugin. I was able to resolve the issue by using the following qt.conf:
[Paths]
Prefix = ./
Plugins = plugins
Also the folder structure was:
ExeDirectory\
ExeDirectory\plugins
ExeDirectory\plugins\sqldrivers
qsqlite.dll was located at:
ExeDirectory\plugins\sqldrivers\qsqlite.dll
qt.conf was located at:
ExeDirectory\qt.conf
Figured I would throw my two cents in.
I tried adding the prefix line but still no luck.
Thanks again for the reply.
I tried out plugandpaint example and everything works fine.
Did you output some debug messages in MainWindow::loadPlugins() (don't forget CONFIG +=console)?
Do you use VS2005 -> did you also copy the .manifest files?
Take a look into the registry (regedit) under HKCU\Software\Trolltech\Qt Plugin Cache 4.2\ (or Qt Plugin Cache 4.2.debug for debug) to see if your plugins are found and if they've the correct build key.
The plugandpaint example loads the plugins manually so it should be easy to see if they're found by modifiyng MainWindow::loadPlugins().
Yes, i am using vc2005.
I am also manually loading plugins from my Main app. I don't believe this is the same problem.
Thanks for the reply though.
So why don't you try out to debug it as I mentioned?
So the only problem I can think of is a problem with the manifests / side by side assemblies. The goal was to simplify the dll hell with those crap, but ...
Try to load the dll with QLibrary and see if it works - when it works, the manifest shouldn't be the problem.
Well, i've debugged the problem and here it is;
in vs2005, it automatically embeds the manifest into the .dll / .exe file. For some reason if you do embed the manifest into a plugin dll, it will NOT load. I don't know why but that is the problem. I recompiled all my plugins without the manifest and they run fine. I'm going to attempt to use the command line tools to embed the manifest and see if there is the same problem just for my own curiosity. Thanks for all your replies. Thanks cmake! Really i love it but damn, what a bug.
/edit: also, if you embed the manifest into the plugin dll using mt.exe (rather than letting VS2005 do it for you, it does not cause a problem!) What the heck MS...
Last edited by dcurtis; 9th February 2007 at 03:17.
Bookmarks