eclipse C++ 新手的 GUI
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8866264/
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
GUI for C++ newbie
提问by adhg
With few years of experience with Java I decided it's time to take the time and learn C++. I just compiled and run my first C++ with eclipse (of course) and would like to take it one step fw - I wish to build a GUI.
凭借几年的 Java 经验,我决定是时候花时间学习 C++。我刚刚用 Eclipse 编译并运行了我的第一个 C++(当然),并希望向前迈出一步 - 我希望构建一个 GUI。
Question: what GUIs are available to C++, something that is an open-source and runs on Mac and eclipse.
问题:什么 GUI 可用于 C++,它是开源的,可在 Mac 和 Eclipse 上运行。
回答by lefticus
Some have mentioned Qt, some wxWidgets.
有些人提到了 Qt,有些人提到了 wxWidgets。
A quick rundown on crossplatform gui toolkits that you could try:
您可以尝试的跨平台 gui 工具包的快速概述:
- Qt: Looks appropriately native on whichever platform you use it on. It has its own build system however, which doesn't always like to play nicely with others. If you want the "beginners" experience in making a GUI with Qt, I recommend Qt Creator. It's a standalone IDE built by the developers of Qt.
- wxWidgets: While Qt looksnative (it tries its best to emulate the look and feel of the OS you are running on). wxWidgets isnative. That is, it uses the GUI elements provided by the operating system. Last I looked at wxWidgets the C++ library was falling behind as far as modern development practices go. You are possibly more likely to learn bad programming habits from this library.
- gtkmm: This is from the same guys who make the GIMP and Gnome, which as a MacOS user probably doesn't mean a lot to you. They don't try nearly as hard to fit in as wxWidgets and Qt. However, they probably have the most modern C++ library. They have done a lot of work to use modern C++ development practices. This can be helpful for a new programmer, as you are less likely to learn bad habits from them. On the downside, you'll get thrust into the land of templates and function pointers and such.
- Qt:在您使用它的任何平台上看起来都恰到好处。然而,它有自己的构建系统,并不总是喜欢与其他人很好地合作。如果您想要使用 Qt 制作 GUI 的“初学者”体验,我推荐Qt Creator。它是由 Qt 开发人员构建的独立 IDE。
- wxWidgets:虽然 Qt看起来是原生的(它尽最大努力模拟您正在运行的操作系统的外观和感觉)。wxWidgets是原生的。也就是说,它使用操作系统提供的 GUI 元素。最后我查看了 wxWidgets,就现代开发实践而言,C++ 库已经落后了。您可能更有可能从这个库中学到不良的编程习惯。
- gtkmm:这是来自制作 GIMP 和 Gnome 的同一个人,作为 MacOS 用户,这对您来说可能意义不大。它们不像 wxWidgets 和 Qt 那样努力地适应。但是,他们可能拥有最现代的 C++ 库。他们为使用现代 C++ 开发实践做了大量工作。这对新程序员很有帮助,因为您不太可能从他们那里学到坏习惯。不利的一面是,您将进入模板和函数指针等领域。
Those are the big ones with the most momentum behind them. There are countless others to also consider.
那些是拥有最大动力的大公司。还有无数其他人也需要考虑。
回答by log0
回答by Chris Dennett
回答by Stuart Golodetz
You might want to take a look at wxWidgets or Qt:
你可能想看看 wxWidgets 或 Qt:
More generally, see here:
更一般地,请参见此处:
I've personally used wxWidgets and found it to be quite good, if you're after a recommendation.
我个人使用过 wxWidgets 并发现它非常好,如果您需要推荐的话。