C++ QT 与 wxWidgets
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19352797/
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
QT vs wxWidgets
提问by rasen58
The question has been asked before, but the most recent one seems to be from two years ago, so there must be new developments that must have occurred in the two toolkits.
之前也有人问过这个问题,但最近的一个好像是两年前的,所以这两个工具包肯定有新的发展。
So which toolkit should I use for developing a GUI with C++? What are the pros/cons of each?
那么我应该使用哪个工具包来使用 C++ 开发 GUI?每个的优点/缺点是什么?
回答by VZ.
In my obviously biased opinion, the advantages of wxWidgets are:
在我明显有偏见的观点中,wxWidgets 的优点是:
- Native widgets (as far as possible) guarantee native look andfeel
- Standard C++ only, no special preprocessor/extensions
- Possible to link statically to closed source applications without buying a commercial licence
- 本机小部件(尽可能)保证本机外观和感觉
- 仅标准 C++,无特殊预处理器/扩展
- 无需购买商业许可证即可静态链接到闭源应用程序
Also, whether it's an advantage or a disadvantage is up to you to decide, but wxWidgets is primarily a GUI library and seeks to play well with the other specialized libraries (like SOCI or asio, for database and network support, respectively) instead of trying to be the one and only true library for everything.
此外,它是优势还是劣势由您来决定,但 wxWidgets 主要是一个 GUI 库,并寻求与其他专业库(如 SOCI 或 asio,分别用于数据库和网络支持)一起使用,而不是尝试成为唯一一个真正的图书馆。
回答by adnan kamili
If you are comparing wxWidgets with Qt, wxWidgets literally stands no where. Qt is a complete framework where you can write code and generate GUIfor Linux, Windows, MAC, Android, IOS and even blackberry, and other embedded systems. It has classes for almost anything you wish to do, from controlling your webcam to bluetooth devices etc. Unless you are doing something very specific, you won't need any 3rd party library.
如果您将 wxWidgets 与 Qt 进行比较,那么 wxWidgets 就毫无意义。Qt 是一个完整的框架,您可以在其中为 Linux、Windows、MAC、Android、IOS 甚至黑莓和其他嵌入式系统编写代码并生成 GUI。它有几乎任何你想做的事情,从控制你的网络摄像头到蓝牙设备等等。除非你做一些非常具体的事情,否则你不需要任何 3rd 方库。
On the other hand, wxWidgets, essentially offers a way of creating GUI, with many other classes too but they are quite few in comparison to Qt.
另一方面,wxWidgets 本质上提供了一种创建 GUI 的方法,还有许多其他类,但与 Qt 相比它们很少。