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 |
Select Main Form |
Running qmake
List Of Project Files |
Running qmake (Generating Makefile) |
To running qmake command open terminal from there and then type :
qmake
After running qmake, new Makefile file should be found there.
Make executable file
Running make (Compiling Project) |
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.
Search newest article here :