Solved Is necessary have QT creator if i already created my interface
-
Hello friends! that is my cuestion. I have created a interface with QT creator and now my intention is create a executable to use this interface. Then, will i need QT creator installed in my laptop after? Thanks!
-
@AdrianCruz
Hi
What do you mean by interface ?
A DLL/so file that can be loaded as plugin for Creator using
its interface for projects etc ? -
@AdrianCruz No, you don't need QtCreator, but you need Qt and a compiler to be able to build your app.
-
Hi
If you mean run the compiled app standalone, then please see here
https://forum.qt.io/topic/92577/dll-missing/2 -
@mrjj yes this, then, if i want to run my app (interface) in other computer, because is a app for my final project and i will need to run in others computers. Do i just need to place the missings DLL in the same folder?
-
@AdrianCruz
Yes , basically its just a folder with the Qt dlls you app needs.
There is tool to help get them. -
@AdrianCruz You should take a look at https://doc.qt.io/Qt-5/windows-deployment.html
-
@mrjj Thanks so much! i have tried to find the missing DLLs with the windows tool but i received this message when i run the tool
Warning: Cannot find GCC installation directory. g++.exe must be in the path.
And also, after, many DLLs are still missing. What is the issue?
-
@AdrianCruz I found the problem. Just needed to include the installation of MinGW in the path. Now the windows tool run properly but, i have found a new issue, when i try to run the .exe, i receive of windows a message that it says that it cannot find libwinpthread-1.dll. Another solution?
-
@AdrianCruz
It's another MinGW DLL. Either if you're going to do it yourself by hand make sure you copy all the needed stuff, or better use the Windows deployment tool to make up a package for distribution and do it properly. -
@AdrianCruz said in Is necessary have QT creator if i already created my interface:
I found the problem. Just needed to include the installation of MinGW in the path.
No, please don't add MinGW to your PATH! This can break other apps.
You should deploy your .exe and DLLs properly. @JonB already mentioned the Windows deployment tool: https://doc.qt.io/Qt-5/windows-deployment.html
At the end of the deployment, the required MinGW and Qt DLLs will be in the same folder as your .exe.
-
@JKSH then, i will delete the MinGW of the path. But when i am using the windows tool and the tool returns this :
-
Now it's fixed, but i have another question...ajajaja
I have my app working without opening QT creator, but the background picture of my app is not appear, why??
-
Hi,
What path are you using to load it ?
What about using Qt resources system to get it builtin in your application ? -
@AdrianCruz said in Is necessary have QT creator if i already created my interface:
the background picture of my app is not appear, why??
Some possible reasons:
- Your app can't find the picture
- You didn't deploy the required image plugin
How do you load the background picture?
-
@JKSH with the next code:
QPixmap bkgnd("../InterfazKinect/img/foto_index_sinTXT.png");
Running in QT creator the picture appears but using the executable not.
-
@AdrianCruz
well its a relative path.
so if u go to exe. and go one step back it expects there to be
InterfazKinect folder and inside there the img folder.
To avoid this, you can use q resource files.
http://doc.qt.io/qt-5/resources.html
http://www.bogotobogo.com/Qt/Qt5_Resource_Files.phpits then compiled into exe.