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 Quick Application and QT Widget - 图1 QT Quick Application and QT Widget - 图2 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 Quick Application and QT Widget - 图3 QT Quick Application and QT Widget - 图4 QT Quick Application and QT Widget - 图5 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 Quick Application and QT Widget - 图6 QT Quick Application and QT Widget - 图7 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 Quick Application and QT Widget - 图8 QT Quick Application and QT Widget - 图9 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 Quick Application and QT Widget - 图10 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 Application and QT Widget - 图11 QT Quick Application and QT Widget - 图12 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 Application and QT Widget - 图13 QT Quick Application and QT Widget - 图14 QT Quick Application and QT Widget - 图15 Qt Quick is an excellent choice for rapid UI prototyping and development.
HW accelerated graphics QT Quick Application and QT Widget - 图16 QT Quick Application and QT Widget - 图17 QT Quick Application and QT Widget - 图18 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 QT Quick Application and QT Widget - 图19 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 Quick Application and QT Widget - 图20 QT Quick Application and QT Widget - 图21 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 QT Quick Application and QT Widget - 图22 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.

Reference

https://doc.qt.io/qt-5/topics-ui.html#:~:text=Qt%20Widgets%20provide%20means%20for,not%20aim%20to%20look%20native.&text=Qt%20Widgets%20do%20not%20scale,animations%20in%20a%20declarative%20manner.