"QT" QT Development and debugging environment configuration under Windows

Source: Internet
Author: User

The previous article has confessed to compiling the QT custom version from the source code. Now you can start configuring the development and debugging program and write a Hello world.

1. IDE

Although QT has an official VS plugin that allows us to develop QT applications in VisualStudio, I feel that the experience is not very good, and I prefer to use the refreshing QT creator to develop.

Qtcreator: http://download.qt-project.org/official_releases/qtcreator/3.3/3.3.0/ Qt-creator-opensource-windows-x86-3.3.0.exe.

After installation, you need to configure the location of the QT binary library, as well as the debugger. For non-custom compiled QT libraries (installed as installation files), Qt Creator seems to automatically find the QT library location, does not need to be configured, and in the case of using the MinGW compiler, it seems that you do not need to set the debugger.

2. Configure the Build Suite

Open QT Creator, select Tools, Options menu, then select Build and run on the left, and then select the QT Versions tab, as shown in:

Manually add the Qmake.exe in the compiled QT library. The 32bit version detected above is the 2 binary version I used before.

Next, switch to the Build Suite (kit) Tab:

If you add it without adding it, make sure the following settings are correct. The debugger does not have to worry about the first item.

3. Configuring the Debugger

Using the QT Creator + Visual C + + compiler to develop QT applications, the default is no debugger, the official said can use CDB, but congratulations, if you follow the official tutorial to configure it, it will be very troublesome, because you need to install a Windows SDK 7.1 (only one of the debugger), However, its installation requires VS,SP1 patches and so on to be installed in strict order to succeed.

If you do not use CDB, you have two options:

1) Install the QT for vs plugin, and then open the project file (. Pro) with VS to compile and debug. Unfortunately, there may be some errors in the conversion that can cause the compiler to run;

2) Compile your Helloworld.exe in debug mode, then use vs to open it (Secret: "File", "Open", "project/Solution", then select the exe you want to debug, OK), debugging, note that you can open the source file set breakpoints Oh.

But switching to switch to trouble Ah, can be in the QT creator debugging the best. Then you need to configure CDB. Do not install the Windows SDK according to the official website, only need to prepare a Windows SDK 7.1 64-bit installation files (ISO) (not to download here: http://www.microsoft.com/en-us/download/ details.aspx?id=8442), then unzip or load with the virtual CD-ROM, locate the Dbg_amd64.msi on the disc and install it (the path is < CD root directory >\setup\winsdkdebuggingtools_amd64\ )。

Then, as in step 2nd, open the option, select the "Debuggers" tab and configure it:

Also, set the debugger in the build suite to CDB.

OK, now you can create a new QT Widgets application type of Hello World project and try to test if the configuration is successful.

"QT" QT Development and debugging environment configuration under Windows

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.