How to run a Qt application?


I have been using Qt creator to make applications using the Qt libraries. I can run these applications by just clicking the play button, but I want to learn how to make applications run just by double clicking on a .exe. So how can I do this?

1/28/2013 10:41:31 AM

Accepted Answer

I'm assuming you are running windows since you mention an .exe file extension. Look in the debug and/or release subdirectories of your project to find the produced binary. You can double-click on it to run the application. However, there are several DLL's that will be required. So, make sure they are in your PATH or copy them in the same directory. Dependency Walker is useful for finding out what you need.

3/7/2009 4:18:58 AM

If you have built a 'release' version of your program, copy it and the following DLL's from qt\bin to a directory:

QtCore4.dll, QtGui4.dll and mingwm10.dll (if you are compiling with gcc and minGW).

If you are running a 'debug' build, you will need the debug versions of the Qt DLLs. They have the same name but with a 'd' at the end of the name.

There may be other Qt DLLs you will have to copy depending on Qt modules you are using in your program.

You can find out more from this page (Qt docs website) Deploying Qt Applications

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow