QGuiApplication constructor failing
-
My Qt 5.1.0 Windows application runs fine within creator.
When I copy it to another directory, with all the required DLLs, it seems to be exitting somewhere in QGuiApplication.
I'm logging line by line, to file, and it doesn't make it past the call to
@ QGuiApplication app(argc, argv);@I get the usual "This application has requested the Runtime to terminate it in an unusual way" popup, but nothing more.
I put a try{}catch block round the call just in case, and that's not getting triggered.
Any ideas what could be causing this?
Thanks.
Matt. -
Hi and welcome to devnet,
Did you check the "Deployement Guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html ?
Have a look at the plugin part (platform plugins to be precise)
Hope it helps
-
[quote author="SGaist" date="1379938870"]Hi and welcome to devnet,[/quote]
Thanks.
[quote] Did you check the "Deployement Guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html ?[/quote]
Of course not! How would I know that my application needs plugins when it runs happily in creator :-)
[quote] Have a look at the plugin part (platform plugins to be precise)
Hope it helps[/quote]
That did the job. Thank you!
Seems quite poorly documented compared to the rest of Qt. I've been using it for 5 months without resorting to outside help, and the online docs, old forum posts, and stackoverflow usually suffice.
There doesn't seem to be a "tell me which plugins my application needs" helper anywhere.
-
[quote author="mrjones" date="1379945063"]
There doesn't seem to be a "tell me which plugins my application needs" helper anywhere.
[/quote]
There is no easy way to tell what dynamic plugins your application needs, because they are loaded on demand.
But there are tools available (on windows "ProcessExplorer":http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx for example) to check which libraries your application currenltly has loaded. Every loaded library of the qt plugins directory should be deployed with your application then. -
[quote author="raven-worx" date="1379946316"]...
But there are tools available (on windows "ProcessExplorer":http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx for example) to check which libraries your application currenltly has loaded. Every loaded library of the qt plugins directory should be deployed with your application then.
[/quote]Thanks; that's a good tip.
I arrived at the same result by qDebug()ing the library search path in my debug version, which pointed me at the full list that Qt loads when running in creator, then copying them all to my mock installation. I removed them selectively to get the minimum working set.