Reprinted from ameyume
Original article link
For Linux, enter qt in the ubutnu Software Center and install the response designer, creater, and library.
The following describes how to configure QT creater + mingw + QT libraries in the windows QT development environment:
1. Download and install mingw
Download mingw-get-inst-2012020..exe from the mingwwebsite and install it in the C root directory: C: \ mingw by default. Select C and C ++ compiler for installation. By default, only the C compiler is selected.
2. Download and install QT Libraries
Http://qt-project.org/downloads
(1) You can download the latest version of QT libraries from the above URL. QT libraries is QT designer, which is used to design the UI.
The latest version is QT.
Libraries 5.0 Beta 2 for Windows (501 MB), I downloaded QT
Libraries 4.8.3 for Windows (mingw 4.4, 317 MB later, download a qt-win-opensource-4.8.3-mingw.exe installation file, the size is 324 MB.
The default installation path is c: \ QT \ 4.8.3. During installation, you must specify the mingw installation path as c: \ mingw.After installationAdd the c: \ QT \ 4.8.3 \ bin directory to the path of the system variable.
And new system environment variable qmakespec, 32-bit system set the value to c: \ QT \ 4.8.3 \ mkspecs \ win32-g ++; if it is a 64-bit system, you need to set the value to C: \ QT \ 4.8.3 \ mkspecs \ tru64-g ++
Create a new system environment variable qtdir with the value c: \ QT \ 4.8.3
(2) Open the main interface of QT designer after installation
3. Download and install QT creater
(1) You can also download the QT builder from the URL above. The latest version is QT.
Creator 2.6.0 for Windows (51 MB, download qt-creator-windows-opensource-2.6.0.exe, size 51 m.
Installed in the C: \ QT \ qtcreator-2.6.0 directory by default.You need to add the c: \ QT \ qtcreator-2.6.0 \ bin directory to the path of the system variable. If you do not set system environment variables, the kit cannot be successfully set during project creation, and the types of projects that can be created are also limited.
(2) set the configuration items for building and running QT creator
Open QT creator, select "tools/options", select "build and run" on the left, select the "QT version" tab, and click "add ",Qmake path: C: \ QT \ 4.8.3 \ bin \ qmake.exe.
As shown in:
You also need to set the compiler for the manual settings item on the compilers tab, Set Name To mingw, and set the compiler path to c: \ mingw \ bin \ mingw32-gw.20..exe.
Then you can create a project normally.
(3) create the test1 Project
Select "file/new file and Project", select "Other Projects" on the left side of the pop-up window, select "Empty QT project" on the right, and click "select" to set the project name, and click "Next" because you have already setQt creator build and run configuration itemsClick "Next" in the pop-up window. Click "finish". The project test1.
,