最简单的跨平台小部件工具包?

发布于 2024-07-05 01:48:52 字数 1560 浏览 11 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

々眼睛长脚气 2024-07-12 01:48:52

我们在谈论 GUI 小部件吗? 如果是这样,我可以建议 3 个

FLTK:

http://www.fltk.org/

GTK:

http://www.gtk.org/

QT:

http://trolltech.com/products/qt/

Are we talking GUI Widgets? If so, I can suggest 3

FLTK:

http://www.fltk.org/

GTK:

http://www.gtk.org/

QT:

http://trolltech.com/products/qt/

莫相离 2024-07-12 01:48:52

与其他海报一样,我强烈建议您查看 C++ 工具包。 GTK 可在 Windows 和 Mac OS 上运行,但只会在 Linux 上为您提供真正好的结果。 甚至一些 GTK 维护者也在发明他们自己的面向对象的 C 方言,以避免针对原生 GTK API。

至于C++,就看你想要什么了。 开发方便吗? 每个平台上都有本机 GUI? 商业支持?

如果您想要 Win32 和 Linux 上的原生 GUI(以及 Mac 上的一些半合理的东西),wxWidgets 是一个很好的选择。 这是一篇更长的文章,介绍了真实的 wxWidgets 体验。 自 2002 年撰写该文章以来,Mac 移植已经有了很大的改进,但它仍然存在一些弱点。

As with the other posters, I strongly recommend looking at C++ toolkits. GTK will work on Windows and the Mac OS, but will only give you truly good results on Linux. And even some of the GTK maintainers are inventing their their own object-oriented C dialect to avoid writing GUIs against the native GTK API.

As for C++, it depends on what you want. Ease of development? Native GUIs on every platform? Commercial support?

If you want native-looking GUIs on Win32 and Linux (and something semi-reasonable on the Mac), one excellent choice is wxWidgets. Here's a longer article with real-world wxWidgets experiences. The Mac port has improved substantially since 2002, when that article was written, but it still has some soft spots.

蓝眸 2024-07-12 01:48:52

最容易编写新程序的就是您最熟悉的程序。
最容易使用、测试或分发的可能是最跨平台、最分布式或最受支持的,那么 GTK+/wx/Qt/Tk 呢?

请注意,C 本身并不是一种特别简单的语言,尤其是随着 GUI 面向对象方法的不断发展。

用脚本语言制作原型,然后转换为已编译的最简单的工具包可能是具有脚本语言绑定的任何工具包(pyGTK、wxPython 等)。

也就是说,在“大”工具包中,只有 GTK+ 和Tk 有一个 C 绑定。 据我所知,wxWidgets、Qt 和 FLTK 都是用 C++ 编写的,没有任何 C 绑定。

我建议您学习 C++,然后比较可用的选项。 使用 C++ 进行编码可能感觉就像使用脚本语言进行编码一样,具有极大的便利性,例如自动指针、实用程序类和重载运算符、非侵入式垃圾收集器和易于继承的父类,所有这些都由语言本身和小部件工具包带到您的指尖。

那么我个人的建议是wxWidgets; 非常容易使用,比 GTKmm 有更好的文档,并且比 Qt “更自由”。

The easiest to write a new program in would be the one you're most familiar with.
The easiest to use, test or distribute would probably be the most cross-platform, most distributed or the most supported one, so GTK+/wx/Qt/Tk?

Note that C itself isn't a particularly easy language, especially with the growing object-oriented approach to GUIs.

The easiest one to cook up a prototype in a scripting language, then convert to a compiled one might be any toolkit with a scripting language binding (pyGTK, wxPython, etc.)

That being said, of the "big" ones, only GTK+ and Tk have a C bindings. wxWidgets, Qt and FLTK were all written in C++ and don't have any C bindings as far as I know.

I suggest you look into learning C++ and then comparing the available options. Coding in C++ might feel like coding in a scripting language with great conveniences such as automatic pointers, utility classes and overloaded operators, non-invasive garbage collectors and easy to inherit parent classes all brought to your fingertips by the language itself and your widget toolkit.

Then my personal suggestion would be wxWidgets; quite easy to use, better documented than GTKmm and "freer" than Qt.

断爱 2024-07-12 01:48:52

我专业地使用过 wxWidgets 和 QT。 两者当然都能实现您的目标。 哪一个最简单很难说。 您不会告诉我们您正在寻找易于使用还是易于学习的产品。 Qt 对于大型程序来说更容易。 WxWidgets 更容易学习。 这在很大程度上归因于 QT 中的信号/槽机制,对于大型应用程序来说,这是一个很好但不直观的架构。

这两个库实际上都非常好,我也推荐它们用于非跨平台编程。

I've used both wxWidgets and QT professionally. Both are certainly capable of meeting your goals. Which one is easiest is hard to say. You don't tell us whether you're looking for easy to use, or easy to learn. Qt is easier for big programs. WxWidgets is easier to learn. This for a large part due to the signal/slot mechanism in QT, which is a good but non-intuitive architecture for large applications.

Both libraries are actually so good that I'd recommend them for non-crossplatform programming too.

站稳脚跟 2024-07-12 01:48:52

我真的很喜欢Qt。 现在已经在几个项目中使用它了。

虽然我目前正在进行的项目将仅针对 Windows 发布,但我们的一些开发人员在 Mac OS X 下使用 gcc 进行编码。 使用不同的编译器和环境对于定位错误和错误有额外的好处。 错误。

我忘了提及 Qt 有一个非常好的文档,其中包括许多有助于快速入门的实际示例。

I really like Qt. Have been working with it in several projects now.

Although the project, I am currently working on, will be released for windows only, some of our developers code under Mac OS X using the gcc. And using different compilers and environments is an extra benefit for locating errors & bugs.

I forgot to mention that Qt has a really good documentation including lots of practical examples that help for a quick start.

伪装你 2024-07-12 01:48:52

我不知道我个人使用过什么 C API,但是 wxWidgets 是 C++。 它可以在 Windows、Linux 和 Mac OS X 上运行。如果您正在寻找简单的工具,wxPython 就是wxWidgets 的 Python 包装器,并且非常容易使用。

I don't know of any I've personally used with a C API, but wxWidgets is C++. It runs on Windows, Linux, and Mac OS X. And if you're looking for easy, wxPython is a Python wrapper around wxWidgets and it is pretty easy to use.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文