Visual Studio Integrated QT Environment Setup _ detailed and test

Source: Internet
Author: User
1. Sharp weapon ≠ hostilityThere were two projects, and the two projects were interesting to say. One is the monitor software development, requires the use of MFC for development, because before this nearly two years of time has been the development of MFC; came to Tsinghua, met a lot of computer programming Daniel, in terms of GUI interface, they are more recommended QT this weapon. In the writing MFC code, also a little bit of the use of Qtcreator for the introduction of development, hostility from this ... The lab owner assigned a mission to develop VR (Virtual Reality) and AR (augment Reality) equipment and research key technologies, and confusedly called to the office by the instructor to require Visual Studio as the basic environment, using 3Dslicer, VTK , ITK, QT Design and development of a software, psychological silently ran a group of horses, the boss slowly come well. Just entered the school ah ... There is nothing, one by one conquer it. 2.Visual Studio2010 integrated qt Environment Setup

2.1 Download Qt5.2 installation package and QT plugin Qt5.2, qt plugin download address: http://qt-project.org/downloads.
QT More version download address: http://download.qt.io/official_releases/qt/.
Find the corresponding version of the download, which contains a number of different versions, MSVC2010, MSVC2012 respectively refers to support VS2010 and VS2012 QT version, and OpenGL and non-OpenGL is the difference is whether to support Opengl,android, iOS is the QT version that supports the Android and iOS platforms, respectively. Here I select the version (annotated), as follows:
Qt-windows-opensource-5.2.0-msvc2010_opengl-x86-offline.exe (OpenGL version)
Visual Studio add-in 1.2.2 for QT5



2.2 Installation T-windows-opensource and visual Studio add-in installation sequence is not required, the installation process is no longer said (fool-type-next), the installation path does not contain Chinese, space, special characters (~<> |? *!@#$%^&:,;). When the visual Studio add-in is installed, vs will appear with the appropriate QT options.


2.3 Configuration Development Environment selection: QT5->QT options->add, configure VS development environment.


This is chosen according to your Qt installation path, path: D:\Software\Qt\Qt5.2.0\5.2.0\msvc2010_opengl.
Description: 4.8.3 is my previous version, because I may install many different versions.

Suppose that there are many problems with the new version, I do not want to use, to change a version, how to do. Select the version you want to use as follows:


If you select Version 4.8.3, you must download a visual Studio add-in for QT4 plug-in before you can use it (principle: Version corresponds). After the above configuration is complete, you can test the QT project.
3. Test with a newly built platform

3.1 New Qt Project selection: File-> new-> project->QT5 PROJECTS->QT application, enter project name, next ... For new. As follows:


Select the dependent modules: the most basic Qtcore, Qtgui, qtwidgets and some audio/video, network, database, XML, OpenGL-related modules, you need to use the direct check.


When you are done, you are ready to run. Select: Debug-> start execution or CTRL+F5. As follows:


3.2 Adding environment variables

Workaround:
(1) Right-click Computer-> Properties-> advanced system Settings-> advanced-> environment variables, add environment variables (recommended)
Qtdir:d:\software\qt\qt5.2.0\5.2.0\msvc2010_opengl
Path:%qtdir%\bin
(2) Locate the missing *.dll (D:\Software\Qt\Qt5.2.0\5.2.0\msvc2010_opengl\bin) in the Qt installation directory and place it in the same directory as the executable program.

Run again:


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.