QT installation configuration process

Installation of QT, QT creator, environment configuration:


1) One way is to install the integrated QT and QT Creator directly. specific:

A separate QtCreator is useless, it needs to install the compilation development tools, install the Qt library itself and documentation. If you install qtcreator, if you don't install anything else, it means nothing. You must install a whole set of things before you can use it, so you need to install the full QtSDK. Introduction to QTSDK: http://doc.qt.io/archives/sdk-1.2/sdk-installing.html

QT online installer is an online installation, which will automatically install QT creator, QT library, and compiler. During the installation process, you need to select the version of the QT library you want to install, the version of QT cteator (in the Tool option), and the version of the compiler.

There are also related download links organized by netizens on domestic websites such as QTCN: http://www.qtcn.org/bbs/read-htm-tid-1075.html

After installation, you need to add the Qt installation directory path to the system variable Path, for example, C:\FrankFang_Gulugulu\software\softwareSetup\QTonlineInstall\5.10.1\msvc2017_64\bin is not used!!

After the installation is complete, you need to configure the development Kit.  Open the installed QT creator, and go to Tools---Options:

First of all, enter the Qt Version page, it will display the installed qt version automatically detected by qt creator. If it cannot be detected automatically, check it manually. After clicking a certain version, the path will be displayed below, which is actually the path of qmake, such as C:\FrankFang_Gulugulu\software\softwareSetup\QTonlineInstall\5.10.1\mingw53_32\bin\qmake.exe


Then, go to the compiler page: the installed compiler automatically detected by qt creator will be displayed. If it cannot be detected automatically, check it manually.


Click on a certain version of the compiler, the path will be displayed below, as shown in the figure below, in fact, it is to formulate the path of g++.exe, gcc.exe:


Through the above two steps, after confirming that the compiler and qt version you want exist, you can build the kit: This step is generally set manually, click the "Desktop (default)" manually set, and the specific settings will pop up below. The ones I circled in red in the picture below must be selected. Note that if MinGW xxx is selected for C: in the compiler column, MinGW xxx should also be selected in the C++ column.


Questions:

What is the difference between different compiler MinGW versions? :


2) QT and QT Create are installed independently:

QT is a class library (QT libraries), and QTCreator is a development environment. To use QTCreator, you must first build the QT platform. What does this platform need? Mainly need the following:

(1) QT: There are slight changes in each version of the QT library. You can choose the version according to your own needs. The personal needs here do not refer to functions, but to the teaching resources you can choose. If you have a QT4 book, it is best Just choose the QT4 library.

(2) Compiler: There are two main types, one is GNU's MinGw, and the other is Microsoft's VS platform. There are two main Qt compilation methods: MSVC and MinGW. If you choose the MSVC compilation method, you need to configure the Visual C++ environment, which is more troublesome, while the MinGW compilation method is relatively simple. Download from the MinGW website, such as mingw-get-inst-20120426.exe, select C and C++ compiler during installation, and only the C compiler is selected by default.

(3) Debugger

In summary, there are three things to download:

QT Creator , http://download.qt.io/official_releases/qtcreator/ , select a version, ex: qt-creator-windows-opensource-2.6.0.exe , download and install.

QT library, ( https://download.qt.io/official_releases/qt/ ), choose a release, e.g. qt-opensource-windows-x86-5.10.1.exe 

MinGW ( http://www.gnu.org/ ) MinGW is a suite that includes gcc, g++, and gdb.

The three specific installation methods are basically default installations. After the installation is complete, open QT Creator, go to Tools-->Options-->Build and Run , specify the QT library and compiler here, the debugger does not need to be specified, QTCreator will specify it by itself. Specifically, the QT library and compiler are selected first, and then the build kit. After the build is complete, you can start writing programs.


以上是在win7的环境下安装,Linux下的安装过程大致也是相同的,只是软件的安装过程有点不一样。因为QT库提供的是源码包,所以安装比较麻烦,大致是解压(tarzxvf...)-->配置(./configure)-->执行make-->最后执行sudo makeinstall来安装。QT库安装完毕之后一样的配置方法。

可以参考http://www.cnblogs.com/emouse/archive/2013/01/28/2880142.html(本人在Ubuntu14.04 LTS下亲测有效)。

3)others:



ref:

https://blog.csdn.net/walker19900515/article/details/45374923

       


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325763803&siteId=291194637