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