本文介绍了一旦它已经在一个项目上工作,如何在 Visual Studio 中的另一个项目上使用 Qt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 C++ 和 Qt 的新手,我正在支持一个使用它的项目.有人用 Qt 设置了我的 Visual C++ 环境.我想开始另一个测试项目,让我练习 C++ 和 Qt.我在 Visual Studio 中创建了一个新的 C++ 项目,但我不知道如何向其中添加 Qt 库.Visual Studio 顶部有一个 Qt 菜单项.有人知道怎么做吗?

I am new to C++ and Qt and I am supporting a project using it. Someone set up my Visual C++ environment with Qt. I wanted to start another test project for me to practice with C++ and Qt. Ive created a new C++ project in Visual Studio, but I have no idea how to add the Qt library to it. There is a Qt menu item at the top of Visual Studio. Anyone know how?

推荐答案

当您在 VisualStudio 中选择新项目 (SHIFT+CTRL+N) 时,您应该会在左侧看到 Qt4 项目选项卡.选择它,然后选择要创建的 Qt 项目的类型.您很可能需要一个 "QtApplication" 或 "Qt Console Application" .当您以这种方式创建应用程序时,您将拥有所有 Qt 库并包含 Qt-VS 插件自动设置

When you select new project in VisualStudio (SHIFT+CTRL+N) you should see Qt4 Projects tab to your left. Select it and then select the type of Qt project you want create. Most likely you would be needing a "QtApplication" or "Qt Console Application" . When you create an application this way, you will have all Qt libraries and includes setup by the Qt-VS Addin automatically

顶部的 Qt 菜单表示您已经安装了 Qt-VisualStudio 插件.

The Qt menu on the top means that you already have a Qt-VisualStudio add-in installed.

这篇关于一旦它已经在一个项目上工作,如何在 Visual Studio 中的另一个项目上使用 Qt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 09:07