Developing QT programs with Visual Studio 2015

Source: Internet
Author: User
Tags windows 7 x64

0. Development environment and tools

Operating system: Windows 7 x64

Compiler: Visual Studio 2015 Community Edition

QT Version: 5.6.0

Programming Assistant: Visual Assist X 2074.

1. Installation

You need to install the following tools in turn: vs2015, Qt 5.6.0 for Windows 32-bit (VS 2015), Perl.

Qt installation path: D:\Qt\Qt5.6.0_x86. After installation, add the following path to the system environment: D:\Qt\Qt5.6.0_x86\5.6\msvc2015\bin.

Perl installation path: C:\Perl.

2, install the plug-in

In order to use QT5 in vs2015, the plugin needs to be installed first. In Visual Studio 2015, click Tools-Extensions and updates ... to open the Administration window. Click on the "Online" tab in the left column and enter QT5 in the search to find the expansion pack qt5package, such as:

  

You can see the "QT5" entry in the IDE menu of Visual Studio 2015 after installation. Click "QT5"-"Qt Option ..." To open the Administration window. Click the button "Add" to select the QT5 installation path. Note that it is the full path that contains the msvc2015, which is my installation path. Because I have both 32-bit and 64-bit versions installed, I see two lines of configuration.

  

3. Configure Visual Assist X

  

  

4. Installing Qtcharts Components

The installation process is described in the following blog post: http://blog.csdn.net/wokaowokaowokao12345/article/details/50933447?ticket= St-113505-xcjgi5awkfdhsmpdc9fm-passport.csdn.net

Another thing to note is the need to add a user-defined path macro $ (Qtdir) to the project. Method: Open the Properties manager for Visual Studio, add a property page, and add a user-defined macro. Name: Qtdir, Value: D:\Qt\Qt5.6.0_x86\5.6\msvc2015.

Test program run:

  

5, Chinese garbled

You need to add a line #pragma execution_character_set ("Utf-8") to the stdafx.h.

Developing QT programs with Visual Studio 2015

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.