本文介绍了好的C ++ GUI库Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个好的windows GUI库的C ++。我认为理想的特征应该是:

I'm looking for a good windows GUI library for C++. The ideal characteristics in my opinion should be:


  • 现代。 MFC,wxWidgets,Qt很久以前就开始了,他们不使用现代的C ++特性和标准库。

  • 拥有丰富的控件, b>几乎无处不在的HTML的能力是一个幸福,我喜欢wxWidgets,当我不讨厌它。

  • 开源。这是必须的。

  • 以某种方式拥有表单设计师。是的,这将是巨大的。经过多年的德尔福工作,我每次都要手动指定控制尺寸。

  • 免费商业使用。但是如果一些图书馆真的很好,那么我会考虑购买。

  • 跨平台。这个规范只是一个打破☺。

  • Modern. MFC, wxWidgets, Qt were started a long time ago and they don't use modern C++ features and standard library.
  • Have a rich set of controls with decent features. The ability to drop HTML almost everywhere is a happiness for which I love wxWidgets when I don't hate it.
  • Open source. It's the must. If sources are available after purchase then it's considered ok.
  • Have a form designer in some way. Yeah, it would be great. After years of working with Delp I cry every time I have to specify control sizes by hand.
  • Free for commercial use. But if some library is REALLY good, then I will consider buying it.
  • Cross platform. This specification is just a tie-breaker ☺. I can live without this.

请向候选人推荐您的想法。每个答案都有一个库。

Please suggest your ideas for candidates. One library per answer please.

P.S。对不可避免的语法错误,我深感抱歉。英语不是我的母语。

P.S., I'm sorry for inevitable grammar errors. English is not my native language.

推荐答案

我认为你写的Qt太快;它不使用标准库很多,但是与过时相比,具有不同的优先级。 QT容器使用迭代器,模板算法等,但有不同的迭代器模型; Qt迭代器在元素之间而不是在它们之间。这使得正向和反向遍历对称,并且清理一些边缘情况用于在遍历时插入和移除元素,虽然它的效率稍低。他们也提供STL式迭代器。它是GUI库IMO的有效选择;容器的性能不太可能是关键因素。

I think you're writing Qt off too quickly; it doesn't use the standard library much, but that has less to do with being obsolete than with having different priorities. The QT containers use iterators, template algorithms, etc, but have a different iterator model; Qt iterators point between elements instead of at them. This makes forward and reverse traversal symmetric, and cleans up some edge cases for inserting and removing elements while traversing, though it's a little less efficient. And they do provide STL-style iterators too. It's a valid choice for a GUI library IMO; performance of the containers is unlikely to be the critical factor.

对于预处理器(moc),将其想象为一个知道如何读取C ++头文件的IDL编译器而不是需要自己的语言。它不会预处理您的代码,它是直接编译的。它只是生成一个额外的cpp文件,包含信号/槽回调的封送处理,当它们跨线程边界并需要同步时,可能会变得麻烦。

As for the preprocessor (moc), think of it more as an IDL compiler that knows how to read C++ headers instead of needing its own language. It doesn't preprocess your code, which is compiled directly. It just generates an additional cpp file containing the marshaling for signal/slot callbacks, which can get rather messy when they cross thread boundaries and need synchronization.

Qt是免费的,如果你可以释放您的来源(即使是商业用途;有多少内部工具真正需要是专有的),如果您不能(没有单位使用费或任何特别烦人的)

Qt is free if you can release your sources (even for commercial use; how many in-house tools really need to be proprietary), and not unreasonably priced if you can't (no per-unit royalties or anything particularly annoying)

这篇关于好的C ++ GUI库Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 02:36