在 Mac 上进行 Qt 开发的 Qt Creator 与 Xcode

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4888583/
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-14 20:10:28  来源:igfitidea点击:

Qt Creator vs Xcode for Qt development on the Mac

xcodeqtmacosqt-creator

提问by Enrico Detoma

I'm about to start a Qt project on the Mac and I'm not sure which IDE to choose between:

我即将在 Mac 上开始一个 Qt 项目,但我不确定要在哪个 IDE 之间进行选择:

  • Qt Creator
  • Xcode
  • Qt 创造者
  • Xcode

Which are the advantages/disadvantages of these two IDEs for Qt development on the Mac?

这两款 IDE 在 Mac 上进行 Qt 开发的优缺点是什么?

回答by Patrice Bernassola

Personally I'm using QtCreator in order to have the same on all platforms. The main advantage I give to it is that it have been developed for Qt.

我个人使用 QtCreator 是为了在所有平台上都一样。我给它的主要优点是它是为 Qt 开发的。

The main advantage I give to XCode is its integration to MacOSX.

我给予 XCode 的主要优势是它与 MacOSX 的集成。

Now for you it depends:

现在对你来说取决于:

  • If you always use XCode, You should continue using it for Qt to keep your marks
  • If you always use QtCreator, you should continue using it
  • If you start developing on MacOSX (or you've never used XCode) you should use QtCreator
  • 如果你总是使用 XCode,你应该继续使用它来为 Qt 保留你的分数
  • 如果你一直使用 QtCreator,你应该继续使用它
  • 如果您开始在 MacOSX 上开发(或者您从未使用过 XCode),您应该使用 QtCreator

Then my advice is: use the IDE you prefer to use

那么我的建议是:使用你喜欢使用的 IDE

回答by Stephen Chu

Qt Creator has much better integration with Qt in code editing, UI designing, and debugging. And it's the same across platform.

Qt Creator 在代码编辑、UI 设计和调试方面与 Qt 有更好的集成。跨平台也是一样的。

My issue with Creator on the Mac is it's debugging facility is not on a par with other platform. The python script-able debugger is not as functioning as, say Windows version of Creator. This is not Qt/Nokia's fault since the gcc/gdb on Mac are versions behind. Apple switched its focus to LLVM and left gcc tool chain, eh, to its natural death on the platform.

我在 Mac 上使用 Creator 的问题是它的调试工具与其他平台不一样。python 脚本调试器的功能不如 Windows 版本的 Creator。这不是 Qt/Nokia 的错,因为 Mac 上的 gcc/gdb 版本落后。苹果把重心转移到LLVM,留下gcc工具链,呃,在平台上自然消亡。

I actually do much of my developing on a Windows VM. Only switch to Mac for building and debugging something that's only Mac-specific.

实际上,我的大部分开发工作都是在 Windows VM 上完成的。只切换到 Mac 来构建和调试特定于 Mac 的东西。

回答by David Huang

Both options have issues. Qt Creator has problems with projects that have complicated project hierarchies (complicated in terms of folder structure.)

这两个选项都有问题。Qt Creator 在项目层次结构复杂(文件夹结构复杂)方面存在问题。

With Xcode, there are issues if you want to have some objective-c source in your project and if you want to be able to step into Qt source while debugging.

使用 Xcode,如果您想在项目中包含一些 Objective-c 源代码,并且您希望能够在调试时进入 Qt 源代码,就会出现问题。

Most of my development is done on the Mac using Xcode and BBEdit. I switch over to Developer Studio on Windows for testing or if I need to be able to step into Qt while debugging.

我的大部分开发都是在 Mac 上使用 Xcode 和 BBEdit 完成的。我切换到 Windows 上的 Developer Studio 进行测试,或者是否需要在调试时进入 Qt。

Given the amount of time we all spend working working in these environments, you should try both and use what suits you best.

考虑到我们在这些环境中工作所花费的时间,您应该尝试两者并使用最适合您的方式。

回答by trojanfoe

You also need to consider eclipse. I have spent the last week using Qt Creator and being a long-time eclipse user (for both Java and C++) I find it inferior. Once (if) Xcode 4 support is added to Qt, this might change, but at the moment my vote goes with eclipse even without the 'Qt Integration' available (i.e. just using the 'C++ Makefile project with existing sources').

您还需要考虑日食。上周我一直在使用 Qt Creator,并且作为 eclipse 的长期用户(对于 Java 和 C++),我发现它很糟糕。一旦(如果)将 Xcode 4 支持添加到 Qt,这可能会改变,但目前我的投票支持 eclipse,即使没有可用的“Qt 集成”(即仅使用“C++ Makefile 项目和现有源”)。