PDA

View Full Version : creating qt apps



Dopt
9th August 2012, 11:59
Hi, all I do in Qt is just run QtCreator's compiler and display the window/widget that I wrote.
Few quetions I want to ask:
1)how to make my Qt project to become a real application?(just click the icon/shortcut to run the program)
2)do other's pc need to install qt too to run Qt apps?

spirit
9th August 2012, 12:48
1. Steps to Programming Qt Applications (http://qt-project.org/doc/qt-4.8/gettingstarted-develop.html).
2. Deployment (http://qt-project.org/doc/qt-4.8/gettingstarted-develop.html#qt-deployment) (it's actually a part of the first link).

Dopt
9th August 2012, 15:53
thanks for reply.
if I download a qt app from http://qt-apps.org/, I use QtCreator to run .pro file and use?or any other way?

spirit
9th August 2012, 15:54
Opening a pro-file in the QtCreator is enough. :)

alitoh
9th August 2012, 22:12
The second question forces you to read the links provided, but the first one is easily answered; they are real applications already. Open your project folder and look for the "projectname.exe" file. Voilá. Qt as a framework also takes care of building the appropiate binary for whichever platform it is you are on. That is, .exe for windows, or adding the executable metadata into the binary for unix systems and such.

Dopt
10th August 2012, 05:57
thanks guys.

Dopt
12th August 2012, 22:09
one more question.If I upload my apps in http://qt-apps.org, I just have to upload my .pro file? or deploy all??

Lykurg
13th August 2012, 08:45
You have to provide the whole source code, the pro file will not be enough. Best you also provide the compiled version.

Dopt
13th August 2012, 12:18
is it the executable file?(I write code in QtCreator and it has automatically build it for me)

yeye_olive
13th August 2012, 13:08
The source code consists of the headers (.h), code (.cpp), forms (.ui), projects (.pro, .pri), translations (.ts), resources (images, data files, ...), etc.

The binaries are the executable (.exe on Windows), libraries if you use some and they can be redistributed, compiled translation files (.qm), resources, etc.

Dopt
13th August 2012, 14:19
I got it. yeye olive, if I'm using Linux, can I make executable Qt file that can run in window?

spirit
13th August 2012, 14:22
Yup, you have to build it on Windows ;)

giarandrea
16th August 2012, 07:26
hi all,
reading this thread it was not clear for me if it is possible (in IOS X) to:
* create a stand alone file opening which my app will run (in whatever other mac, even without Qt)
watching links above i think this could be linked to the "bundle" concept, but it's not clear at all for me if it's right and in case how to use it

Could you please give me any advice/tutorial?

thanks


Andrea

spirit
16th August 2012, 07:29
See Deploying an Application on Mac OS X (http://qt-project.org/doc/qt-4.8/deployment-mac.html).
Note: macdeploy tool is okay for simple projects when there are only Qt deps.

giarandrea
16th August 2012, 16:30
thanks, i'll try it