Solved qt quick application deployment problem
-
I'm trying the procedure of deploying a Qt project. I have this very small project as following:
import QtQuick 2.11 import QtQuick.Controls 2.2 import QtQuick.Window 2.11 Window { visible: true width: 640 height: 480 title: qsTr("Test") Button{ id:adad text:"test" //this line caueses trouble } }
It builds and runs perfectly in QtCreator, the windows shows a button with text on it.
Then I copied the executable somewhere else, the program won't launch. By adding Qt shared libraries, it lauches and shows an empty window. However the button is not shown, and window crashes in a few seconds.The problem seems to be with the text attribute, for if I remove the text attribute leaving only an empty button, It works all good.
I tried windeployqt.exe to copy plugins into the exe folder, but the problem remains.
I feel that the problem is qt failed to load the plugin libraries, but how to figure it out.Thanks for help
-
I currently walk around this issue by changing into MSVC2015 32bit compiler. I was using MSVC2017 64bit before.
But still curious about the reason. what's so different with these two compilers? I can't that I'm missing 64bit libraries in my system because it runs fine in QtCreator.
How does QtCreator set the environment? Is there any way to look into the process of QtCreator run command? -
@mondo said in qt quick application deployment problem:
How does QtCreator set the environment? Is there any way to look into the process of QtCreator run command?
Yes, "Projects/Run/Run Environment" (in QtCreator on the left side).