Install Qt in Windows

Source: Internet
Author: User

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":

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.