WindowsLowerQtInstallation:
InWindowsNext, installMingwAnd then installQtThe installation process is relatively simple and can be done as prompted..
Note: During InstallationQtWill prompt you to selectMingwWill also prompt to automatically set the Environment Variables(Automatically Set by default)
-----------------------------------------------------
QtNext, the firstProgramRunning process:
1, Copy the following program to the file"Hello. cpp"Medium:
# Include <qapplication> # Include <qlabel> Int main (INT argc, char * argv []) { Qapplication app (argc, argv ); Qlabel * label = new qlabel ("Hello QT! "); Label-> show (); Return app.exe C (); } |
2, The file"Hello. cpp"Save in the directory"D: \ QT \ test \ 1 \ hello"(Select a directory based on the actual situation)
3 , Select "QT 4.1.4 Command Prompt" , Enter the command line interface, enter the Save" Hello. cpp "Directory ( Main use Doc Command: Cd d: \ QT \ test \ Hello)
4At the end of the command prompt, enter:
Qmake-Project
(To create a platform-independent project file (Hello. Pro))
Qmake hello. Pro
(To create a platform-specific makefile from the project file)
Make
(To build the Program)
5After the above three steps,Hello. cpp"Directory to obtain the following files:
6In this directory,Release"Folder, getWindowsThe following executable program"Hello.exe":