Monday, September 19, 2011
The beginners is usually compare about
Qt programming with their currently programming environment being used. For example they compare to Visual Basic 6.0, some of the easiest
GUI programming in Windows environment. Because there is a wide different between VB6.0 and Qt, not only in language but also how to create the project, this section will show you step by step creating and compiling project successfully.
In this part, I will show you the simple thing how to create your first Qt GUI application using Qt3. You can use
Qt designer (designerq-qt3 in a terminal command) and then how to compile it to produce or make an executable file program.
Open Qt3 Designer
Qt Designer is similar interface to Visual Basic IDE but it's absolutely different. Qt Designer which is its executable file name is designer-qt3 is for designing the form only. It couldn't be used for compiling program or debugging. Qt Designer will show the preview of form only, unlike a Visual Basic that you can try your program by pressing F5.
But, Qt Designer is a powerful tool to design a GUI in a minute only using drag and drop Widget from toolbox like a Visual Basic. To open Qt Designer use the following command.
open terminal and type :
designer-qt3
Create Project
 |
Create C++ Project Window |
 |
Select Directory Where To Place The Project |
 |
Directory Where The Project Is Saved |
Adding Form or Dialog
 |
Add New Dialog Form |
 |
Saving Form |
Create Main File
 |
Add Main File |
 |
Select Main Form |
Running qmake
 |
List Of Project Files |
 |
Running qmake (Generating Makefile) |
To running qmake command open terminal from there and then type :
After running qmake, new Makefile file should be found there.
Make executable file
 |
Running make (Compiling Project) |
Now, you are ready to compile the project using command make.
 |
Running The Program |
If compiling successfully done, the new file with the name is usually same as project name will be created and marked as executable file. This is your program, try to execute it by double clicking it.
Continue reading › this Qt programming tutorial