Unsolved How to run qml in release app
-
i compiled release version of my app, added all needed libs, then when i tried to start qml part of my app with this code:
engine.reset(new QQmlApplicationEngine );
engine->load(QUrl(QStringLiteral("qrc:/main.qml")));nothing happend. what could be wrong? maybe i need to add some extra files to folder with exe?
-
engine
is some kind of smart pointer, isn't it? I just wonder why you callreset()
there.Does your application work correctly when you run it in your development environment? (from QtCreator or whatever)
Try running the app from console and seeing if it prints any errors.
-
Yes, it works ok in QtCreator. If i run it from qt console everything works correctly. It means that i forgot to add some libs?
-
@bronstein87 said in How to run qml in release app:
Yes, it works ok in QtCreator. If i run it from qt console everything works correctly.
I've meant plain cmd.exe, without any Qt libs added to %path% or anything.
It means that i forgot to add some libs?
Yes, most probably it does. See: http://doc.qt.io/qt-5/windows-deployment.html
Or, to see which libs are missing exactly, use dependency walker http://www.dependencywalker.com/ It's use is described towards the bottom of the deployment guide.