Qt Creator 如何对抗 Eclipse CDT?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/675986/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:35:57  来源:igfitidea点击:

How does Qt Creator shape up against Eclipse CDT?

eclipseqt-creator

提问by Nick Bolton

Qt Creatorlooks like a good IDE. I've been using Eclipse CDTand while a little buggy, it does the job.

Qt Creator看起来是一个不错的 IDE。我一直在使用Eclipse CDT,虽然有点问题,但它可以完成工作。

Does Qt Creator have the same capabilities as Eclipse CDT?

Qt Creator 是否具有与 Eclipse CDT 相同的功能?

采纳答案by John T

Qt Creator uses MinGW under the hood, so it only makes sense that it would be able to compile without using any Qt headers. Simply uncheck all of the headers when making the project and you can code just like you would in any other IDE.

Qt Creator 在幕后使用 MinGW,因此它能够在不使用任何 Qt 头文件的情况下进行编译才有意义。只需在制作项目时取消选中所有标题,您就可以像在任何其他 IDE 中一样进行编码。

I took an example shot for you to see:

我拍了一个例子给你看:

Dead link

死链接

Edit: Ahh you edited your question.

编辑:啊,你编辑了你的问题。

Yes of course! Qt is a great environment and can sure hold it's own against competitors like Eclipse in C++. Although keep in mind Eclipse satisfies a myriad of developers, from Java to C++ to Python among many others. Typically an IDE specializing in one language will be more catered to that language, but Eclipse sure does one hell of a job catering to developers of multiple languages with it's vast amount of plugins. If you're comfortable with Eclipse CDT, I think you will feel right at home with Qt Creator, better yet, pampered.

是的当然!Qt 是一个很棒的环境,并且肯定可以在 C++ 中与 Eclipse 等竞争对手抗衡。尽管请记住,Eclipse 满足了无数开发人员的需求,从 Java 到 C++ 再到 Python 等等。通常,专攻一种语言的 IDE 会更适合该语言,但 Eclipse 确实可以通过大量插件满足多种语言的开发人员的需求。如果您对 Eclipse CDT 感到满意,我想您会对 Qt Creator 感到宾至如归,更好的是,受到宠爱。

such a great piece of software.

这么棒的一款软件。

回答by zhengtonic

Well, QTCreator does exactly what a Linux C++/C dev (i assume you are a linux dev from what i read) would want from an IDE. Neither too much nor too little features. The problem of feature rich IDEs like Eclipse is that you might loose control of your project since it pretty much handles everything. If something goes south you have to take the features/plugins you used into consideration during the debugging process.

好吧,QTCreator 完全符合 Linux C++/C 开发人员(我假设您是我阅读的 Linux 开发人员)希望从 IDE 获得的功能。功能不多也不少。Eclipse 等功能丰富的 IDE 的问题在于,您可能会失去对项目的控制,因为它几乎可以处理所有事情。如果出现问题,您必须在调试过程中考虑使用的功能/插件。

But overall, eclipse is (imho) the better choice since it makes sense to get used to one IDE that can pretty much handle every language. At work i use eclipse CDT for exactly this reason. For private projects i use QTCreator, because C/C++ are the only languages i use for these projects.

但总的来说,eclipse 是(恕我直言)更好的选择,因为习惯一个几乎可以处理每种语言的 IDE 是有意义的。正是出于这个原因,我在工作中使用 Eclipse CDT。对于私人项目,我使用 QTCreator,因为 C/C++ 是我用于这些项目的唯一语言。

I hope this helps

我希望这有帮助

回答by Liviu Gheorghisan

Since you mentioned nothing about Qt, I assume that you plan to use QtCreator for a non-Qt C++ project, with its own custom Makefiles, not qmake-based, not Eclipse-CDT-based.

由于您没有提及 Qt,我假设您计划将 QtCreator 用于非 Qt C++ 项目,它具有自己的自定义 Makefile,不是基于 qmake 的,也不是基于 Eclipse-CDT 的。

After I switched to QtCreator (now working on the same project, same code) I noticed the following advantages of QtCreator:

在我切换到 QtCreator(现在在同一个项目,相同的代码上工作)后,我注意到 QtCreator 的以下优点:

  • QtCreator moves faster than EclipseCDT for the same C/C++ project.
  • EclipseCDT is harder to config with custom Makefiles. QtCreator is easier. This is the case when you checkout a project with its own custom Makefiles, not IDE-generated ones, and you need to map that project's build targets to EclipseCDT build targets/configurations.
  • It's easier to deal with .pro(ject) files in QtCreator than workspaces in EclipseCDT.
  • In my case, the EclipseCDT memory footprint after indexing is about ~2GB. For QtCreator, it is only ~600MB, for the same project.
  • Source indexing in EclipseCDT takes a lot of time - when I start EclipseCDT, my computer is frozen for about 20 minutes due to indexing. In QtCreator it takes a quarter of that time, and the computer is responsive during it.
  • 对于相同的 C/C++ 项目,QtCreator 的运行速度比 EclipseCDT 快。
  • EclipseCDT 更难使用自定义 Makefile 进行配置。QtCreator 更容易。当您使用自己的自定义 Makefile 而不是 IDE 生成的文件检出项目时,就是这种情况,并且您需要将该项目的构建目标映射到 EclipseCDT 构建目标/配置。
  • 在 QtCreator 中处理 .pro(ject) 文件比在 EclipseCDT 中处理工作区更容易。
  • 就我而言,索引后的 EclipseCDT 内存占用量约为 2GB。对于 QtCreator,对于同一个项目,它只有 ~600MB。
  • EclipseCDT 中的源索引需要很多时间 - 当我启动 EclipseCDT 时,我的计算机由于索引而冻结了大约 20 分钟。在 QtCreator 中,它需要四分之一的时间,并且计算机在此期间有响应。

Of course there are a lot of advantages that EclipseCDT offers like the plethora of plugins (EGit, Subclipse, cppcheclipse, etc), but it depends if you really use them.

当然,EclipseCDT 提供了很多优点,例如大量的插件(EGit、Subclipse、cppcheclipse 等),但这取决于您是否真的使用它们。

In the end, I think it's a matter of personal taste and habit, as you can achieve your goals with each of them.

最后,我认为这是个人品味和习惯的问题,因为您可以通过每个人实现您的目标。