Qt Creator 如何用作通用 C++ IDE(不使用 Qt 库)?

2022-01-20 00:00:00 qt qt-creator ide cmake c++

我一直在寻找一个不错的 C++ IDE,我真的很喜欢 Qt Creator 的特性和性能,我计划用它来制作基于 Qt 的应用程序.但是,就目前而言,我只想将 Qt creator 用作通用 C++ IDE,而不使用 Qt 库.我如何才能将 Qt creator 用于常规 C++ 开发?我需要做哪些配置?我希望能得到一些详细的指导.

I've been looking around for a nice C++ IDE, and I really like the features and performance of Qt Creator, and I plan to use it to make Qt based applications down the road. However, for right now, I just want to use Qt creator as general purpose C++ IDE without the use of the Qt library. How can I go about using Qt creator just for regular C++ development? What configurations do I need to make? I would appreciate some detailed guidance with this.

感谢您的时间和合作.我很感激,我希望很快能收到大家的来信.

Thank you for your time and cooperation. I appreciate it, and I hope to hear from you all soon.

推荐答案

我经常这样做.

你有两个选择:

  1. 使用 qmake 项目文件:要摆脱所有剩余的 Qt 内容,请将这些添加到您的项目文件中:

  1. use qmake project files: to get rid of all the remaining Qt stuff, add these to your project file(s):

CONFIG -= qt
DEFINES -= UNICODE QT_LARGEFILE_SUPPORT

请记住,构建仍然需要 qmake 本身.所以你很可能需要安装 Qt.

Remember that qmake itself is still required to build. So you'll most likely need a Qt installation.

使用 Cmake 项目文件.

use Cmake project files.

这两种情况都可以依靠 Qt Creator 的全面支持(左窗格中的文件和项目).Qt Creator 中的 git 和 svn 支持很棒

Both cases can count on Qt Creator's full support (for files and projects in the left pane). git and svn support in Qt Creator is awesome

相关文章