Qt Creator 如何用作通用 C++ IDE(不使用Qt库)?
我一直在寻找一个不错的 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我经常这样做。
您有两个选择:
使用 qmake 项目文件:要删除所有剩余的 Qt 内容,请将它们添加到您的项目文件中:
请记住,qmake 本身仍然需要构建。因此,您很可能需要安装 Qt。
使用 Cmake 项目文件。
这两种情况都可以依靠 Qt Creator 的全面支持(对于左窗格中的文件和项目)。 Qt Creator 中的 git 和 svn 支持非常棒
I do it constantly.
You have two options:
use qmake project files: to get rid of all the remaining Qt stuff, add these to your project file(s):
Remember that qmake itself is still required to build. So you'll most likely need a Qt installation.
use Cmake project files.
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
我最近开始使用 Qt Creator,因为我在 13 英寸笔记本电脑上花费的时间越来越多,并且喜欢它利用空间的方式。除此之外,它功能丰富、快速、可靠,而且 Qt 一点也不差。对于纯 C++ IDE,我一生中
唯一一个像 Qt Creator 一样受欢迎的 IDE 是 Code::Blocks(我经常在这两者之间切换,具体取决于我使用的机器)。
I started using Qt Creator recently because I spend more and more time on my 13" laptop and just love the way it utilizes space. Other than that, it is feature-rich, fast, reliable and Qt isn't bad at all. As for C++ only IDE, it is more than welcome in my life.
The only other IDE that I love as much as Qt Creator is Code::Blocks. (I often switch between the two, depending on which machine I use)
我曾经在一个非 Qt 项目中使用过 Qt Creator,但只是为了它的代码编辑功能和代码完成。我构建了该项目并从单独的终端窗口使用 rcs。我只能说,我对 Qt Creator 作为 C++ 代码编辑器感到满意。
I did use Qt Creator for a non-Qt project once, but only for its code-editing features and code completion. I built the project and worked with the rcs from a separate terminal window. All I can say is that I was satisfied with Qt creator as a C++ code editor.
作为一名 Java 程序员,我一直在使用 Eclipse,所以当我回到 C++ 时,我继续使用它。然而,Eclipse 总是失去理智,我花了很多时间试图让它不再那么愚蠢,发出数百个不是错误的错误。从今天开始,我正在尝试 Qt Creator。到目前为止,它运行良好。
Qt 人员有一个我遵循的快速参考: https://doc.qt .io/qtcreator/creator-project-generic.html
Qt Creator 没有我喜欢的 Eclipse 的所有功能,但到目前为止它对我来说运行良好。我可以按照这些指示导入现有项目,然后编辑它们列出的文件以使事情顺利进行。
例如,您必须通过编辑 .includes 来指定包含路径。
我在 IDE 之外进行构建和运行,因此我不确定“运行”按钮的工作效果如何,但我确信您可以实现这一点。
I've been using Eclipse forever as a Java programmer, so when I returned to C++, I continued to use it. However, Eclipse loses its brain ALL THE TIME, and I spend huge amounts of time trying to get it to stop being so stupid, issuing 100s of errors that aren't errors. As of today, I'm trying Qt Creator. So far, it's working well.
The Qt people have a quick reference that I followed: https://doc.qt.io/qtcreator/creator-project-generic.html
Qt Creator doesn't have all the features I like from Eclipse, but it's working well for me so far. I can import my existing projects following these directions, then edit the files they list to smooth things out.
You have to, for instance, specify your include path by editing .includes.
I do builds and runs outside the IDE, so I'm not sure how well the Run button will work, but I'm sure you can make that happen.
我在 Ubuntu 上使用 Qt Creator 和 CMake。我仍然通常在终端窗口中进行编译,因此使用哪种构建系统并不重要。 CMake 和 qmake 的项目文件可以轻松地将代码文件导入到 IDE 中。我还使用 Ubuntu 存储库中的 GCC 4.6,因此它比当前 Qt SDK 附带的版本更新,并且对 C++11 有更好的支持。我还从 Ubuntu 的存储库安装了 Qt Creator。一切都那么完美,让我想哭。
I'm using Qt Creator with CMake on Ubuntu. I still usually compile in a terminal window so it really doesn't matter which build system you use. CMake's and qmake's project files just makes it easy to import code files into the IDE. I'm also using GCC 4.6 from Ubuntu's repositories so it's newer and has better support for C++11 than the one that currently comes with Qt SDK. I have Qt Creator also installed from Ubuntu's repositories. Everything works so beautifully that I could cry.