Platform windows fail but ONLY if I associate a file format.
Unsolved
General and Desktop
-
wrote on 24 Feb 2016, 10:55 last edited by
I've made a simply app that works ok, can be deployed to other computers since the folder structure is ok I mean /platforms/
/plugins/
etcWhat's the problem then? that I need to associate a file format to this app, and as soon as I double click on that file the app tries to be open but the wellknown error appears:
- This application failed to start because it could not find or load the Qt platform plugin "windows".
Reinstalling the application may fix this problem.
I've tried to pre-load everything but without any luck:
CoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()); QDir::setCurrent(QCoreApplication::applicationDirPath()); QCoreApplication::addLibraryPath("./"); QString sDir = QCoreApplication::applicationDirPath(); QCoreApplication::addLibraryPath(sDir); QCoreApplication::addLibraryPath(sDir+"/plugins/"); QCoreApplication::addLibraryPath(sDir+"/platforms/");
Thank you in advance any tip is welcome!
- This application failed to start because it could not find or load the Qt platform plugin "windows".
-
How do you associate the app with the format? What's the resulting structure in the registry for it?
Put in your deployment directory file namedqt.conf
with following content and see if it works:[Paths] Plugins = .
This will make the app looking for plugins (including "platforms" folder) in the app directory instead of working directory.
2/2