QT Widgets
QT Widgets主要用于Windows,Linux和MacOS这种传统的桌面电脑的界面上,注入office等这些的应用程序。
和QT Quick相比,Qt Widget的表现在touch screen上不是那么的流畅,同时也不具备现代交互那样一般的丰富,也不具备拓展性
Qt Widgets are traditional user interface elements that are typically found in desktop environments. The widgets integrate well to the underlying platform providing native look’n’feel on Windows, Linux and macOS. The widgets are mature and feature rich user interface elements suitable for mostly static user interfaces. In contrast to Qt Quick, the widgets do not scale that well for touch screens and fluid, highly animated modern user interfaces. The widgets are a good choice for applications with traditional desktop centric user interfaces, such as office type applications.
QT不同technology的比较
Qt Quick / Qt Quick Controls | Qt Widgets | Qt WebEngine | Comments | |
---|---|---|---|---|
Used language(s) | QML/JS | C++ | HTML/CSS/JS | |
Native look’n’feel | Qt Widgets and Qt Quick Controls 1 integrate well to the underlying platform, providing a native look’n’feel on Windows, Linux, and macOS. | |||
Custom look’n’feel | Qt Widgets provide means for customization via style sheets, but Qt Quick is a better performing choice for user interfaces that do not aim to look native. | |||
Fluid animated UIs | Qt Widgets do not scale well for animations. Qt Quick offers a convenient and natural way to implement animations in a declarative manner. | |||
Touch screen | Qt Widgets often require a mouse cursor for good interaction, whereas Qt Quick only provides primitive building blocks that were designed with touch interaction in mind. The WebView Qt Quick component has support for multi-touch gestures to interact with web content. | |||
Standard industry widgets | Qt Widgets provide all the bells and whistles, developed over two decades, needed for building standard industry type applications. Qt WebEngine Widgets provide widgets and additional classes to render and interact with web content. | |||
Model/View programming | Qt Quick provides convenient views, but Qt Widgets provide more convenient and complete framework. In addition to Qt Quick views, Qt Quick Controls provide a TableView. | |||
Rapid UI development | Qt Quick is an excellent choice for rapid UI prototyping and development. | |||
HW accelerated graphics | Qt Widgets provide QGLWidget for rendering OpenGL graphics, and Qt WebEngine supports WebGL, but the OpenGL ES 2.0 or OpenGL 2.0 based Qt Quick Scene Graph has proven to provide the best performance for UIs and for integrating with OpenGL content. | |||
Graphical effects | The particle system and shader effects available in Qt Quick are more flexible. Qt Widgets offer very little in this area. | |||
Rich text processing | Qt Widgets currently provide the most comprehensive base for implementing text editors. Qt’s rich text document classes can also be utilized in Qt Quick and Qt Quick Controls’ TextArea, but may require some C++ implementation. | |||
Existing web content | Both Qt Quick and Qt Widgets provide components for presenting simple rich text, but Qt WebEngine is the best choice for presenting full-blown web content. |