简体   繁体   English

使用Visual Studio构建QT

[英]Building QT with Visual Studio

I know there have been a few questions before regarding this, but not too much up to date. 我知道在此之前有一些问题,但不是很多。

I am developing a project with Visual Studio 2015 express edition and I wish to add a GUI to my project via QT. 我正在使用Visual Studio 2015 Express Edition开发项目,并且希望通过QT将GUI添加到我的项目中。

The latest version of QT (5.8.0) has a VS 2015 version, so I assume it is compiled using Visual Studio instead of MinGw. QT(5.8.0)的最新版本具有VS 2015版本,因此我假设它是使用Visual Studio而不是MinGw编译的。

Sorry if this is a very noob question. 抱歉,这是一个非常菜鸟的问题。 I have no experience with QT, but how do I then integrate my QT project into my VS project, do I build the GUI code first in QT? 我没有使用QT的经验,但是如何将QT项目集成到VS项目中,我是否首先在QT中构建​​GUI代码?

If I will create a GUI using the .ui file in QT and then generate the source code for this, can I just copy the source code to my VS Project. 如果我将在QT中使用.ui文件创建一个GUI,然后为其生成源代码,我是否可以将源代码复制到我的VS Project中。 I assume I have to configure the project file in VS as how will VS know where to find the dlls and header files for QT? 我假设我必须在VS中配置项目文件,因为VS如何知道在哪里可以找到QT的dll和头文件? Thanks in advance 提前致谢

You need the VS Tools for Qt. 您需要Qt的VS工具。 They work with >= Visual Studio 2013 Community Edition. 他们使用> = Visual Studio 2013 Community Edition。

You can get them here and all information about how to use them. 您可以在此处获取它们以及有关如何使用它们的所有信息。

Qt VS Tools integrate the Qt development tools into Microsoft Visual Studio 2013, and later. Qt VS Tools将Qt开发工具集成到Microsoft Visual Studio 2013和更高版本中。 This enables developers to use the standard Windows development environment without having to worry about Qt-related build steps or tools. 这使开发人员可以使用标准的Windows开发环境,而不必担心与Qt相关的构建步骤或工具。

The main features of Qt VS Tools are: Qt VS工具的主要功能是:

  • Wizards for creating new Qt projects and classes. 用于创建新的Qt项目和类的向导。
  • Automated build setup for the Meta-Object Compiler (moc), User Interface Compiler (uic), and Resource Compiler (rcc). 元对象编译器(moc),用户界面编译器(uic)和资源编译器(rcc)的自动构建设置。
  • Import and export of Qt project files (.pro) and project include files (.pri). Qt项目文件(.pro)和项目包含文件(.pri)的导入和导出。 *Automated conversion of a Qt VS Tools project to a qmake project, or the other way around. *将Qt VS Tools项目自动转换为qmake项目,或者反之。
  • Integrated Qt resource management. 集成的Qt资源管理。
  • Integrated Qt documentation. 集成的Qt文档。
  • Debugging extensions for Qt data types. Qt数据类型的调试扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM