Qt归根到底是一个强大的C++类库,这些大量的类根据功能分为各种模块。
Qt基本模块(Qt Essentials)
Qt基本模块提供了Qt在所有平台的基本功能,它们在所有的开发平台和目标平台上都能用。Qt跨平台的特性基本在这个模块实现。
模块 |
描述 |
Qt Core |
Core non-graphical classes used by other modules. |
Qt GUI |
Base classes for graphical user interface (GUI) components. Includes OpenGL. |
Qt Multimedia |
Classes for audio, video, radio and camera functionality. |
Qt Multimedia Widgets |
Widget-based classes for implementing multimedia functionality. |
Qt Network |
Classes to make network programming easier and more portable. |
Qt QML |
Classes for QML and JavaScript languages. |
Qt Quick |
A declarative framework for building highly dynamic applications with custom user interfaces. |
Qt Quick Controls |
Reusable Qt Quick based UI controls to create classic desktop-style user interfaces. |
Qt Quick Dialogs |
Types for creating and interacting with system dialogs from a Qt Quick application. |
Qt Quick Layouts |
Layouts are items that are used to arrange Qt Quick 2 based items in the user interface. |
Qt SQL |
Classes for database integration using SQL. |
Qt Test |
Classes for unit testing Qt applications and libraries. |
Qt Widgets |
Classes to extend Qt GUI with C++ widgets. |
Qt Core是Qt类库的核心,所有其他模块都依赖于该模块。也即新建一个Qt功能,Qt Core模块是被自动添加到工程中的。在运行时,也必须链接QtCore.dll.
Qt GUI模块提供了用于开发GUI应用程序的必要的类。在新建一个GUI应用程序时,该模块是被自动添加到工程中的。
其他模块通常不会自动添加到项目中,如果需要使用某个模块,可以在新建项目时选择它,也可以在工程的Qt setting中选择它。如果你习惯用Qt Creator开发,那么你只要在Pro文件中加入(加入网络支持模块):
QT += Network
Qt附加模块(Qt Add-Ons)
Qt附加模块可是实现一些特定目的。这些模块可能只在某些开发平台上有,或只能用于某些特定的操作系统。在安装Qt时可以选择性安装这些模块。
模块 |
开发平台 |
运行平台 |
描述 |
Active Qt |
Windows |
Classes for applications which use ActiveX and COM |
|
Qt 3D |
All |
Functionality for near-realtime simulation systems with support for 2D and 3D rendering. |
|
Enginio (Deprecated) |
All |
All |
A Backend-as-a-Service solution to ease the backend development for connected and data-driven applications. |
Qt Android Extras |
All |
Android |
Provides platform-specific APIs for Android. |
Qt Bluetooth |
All |
Android, iOS, Linux and macOS |
Provides access to Bluetooth hardware. |
Qt Canvas 3D |
All |
Enables OpenGL-like 3D drawing calls from Qt Quick applications using JavaScript. |
|
Qt Concurrent |
Classes for writing multi-threaded programs without using low-level threading primitives. |
||
Qt D-Bus |
All |
Classes for inter-process communication over the D-Bus protocol. |
|
Qt Gamepad |
All |
Android, iOS, macOS, tvOS (including the tvOS remote), Linux, Windows |
Enables Qt applications to support the use of gamepad hardware. |
Qt Graphical Effects |
All |
Graphical effects for use with Qt Quick 2. |
|
Qt Image Formats |
All |
Plugins for additional image formats: TIFF, MNG, TGA, WBMP. |
|
Qt Location |
All |
All |
Displays map, navigation, and place content in a QML application. |
Qt Mac Extras |
All |
macOS |
Provides platform-specific APIs for macOS. |
Qt NFC |
All |
Android and Linux |
Provides access to Near-Field communication (NFC) hardware. |
Qt OpenGL (Deprecated) |
OpenGL support classes. Deprecated in favor of the QOpenGL* classes in the Qt GUI module. |
||
Qt Platform Headers |
Provides classes that encapsulate platform-specific information, tied to a given runtime configuration of a platform plugin. |
||
Qt Positioning |
All |
Android, iOS, macOS, Linux, WinRT. |
Provides access to position, satellite and area monitoring classes. |
Qt Print Support |
All |
Classes to make printing easier and more portable. |
|
Qt Purchasing |
All |
Android, iOS, and macOS. |
Enables in-app purchase of products in Qt applications. |
Qt Quick Controls 2 |
All |
Provides lightweight QML types for creating performant user interfaces for embedded and mobile devices. These controls achieve improved efficiency by employing a simplified styling architecture when compared to Qt Quick Controls. These types work in conjunction with Qt Quick and Qt Quick Layouts. |
|
Qt Quick Extras |
All |
Provides a specialized set of controls that can be used to build interfaces in Qt Quick. |
|
Qt Quick Widgets |
All |
Provides a C++ widget class for displaying a Qt Quick user interface. |
|
Qt Script (Deprecated) |
All |
Classes for making Qt applications scriptable. Deprecated in favor of the QJS* classes in the Qt QML module. |
|
Qt SCXML |
All |
All |
Provides classes and tools for creating state machines from SCXML files and embedding them in applications. |
Qt Script Tools (Deprecated) |
All |
Additional components for applications that use Qt Script. |
|
Qt Sensors |
All |
Android, Qt for iOS, WinRT and Mer. |
Provides access to sensor hardware and motion gesture recognition. |
Qt Serial Bus |
Linux |
Linux and Boot to Qt targets. |
Provides access to serial industrial bus interface. Currently the module supports the CAN bus and Modbus protocols. |
Qt Serial Port |
All |
Windows, Linux, and macOS. |
Provides access to hardware and virtual serial ports. |
Qt SVG |
All |
Classes for displaying the contents of SVG files. Supports a subset of the SVG 1.2 Tiny standard. |
|
Qt WebChannel |
All |
All |
Provides access to QObject or QML objects from HTML clients for seamless integration of Qt applications with HTML/JavaScript clients. |
Qt WebEngine |
All |
Windows, Linux, and macOS. |
Classes and functions for embedding web content in applications using the Chromium browser project. |
Qt WebSockets |
All |
All |
Provides WebSocket communication compliant with RFC 6455. |
Qt WebView |
All |
Platforms with a native web engine. |
Displays web content in a QML application by using APIs native to the platform, without the need to include a full web browser stack. |
Qt Windows Extras |
All |
Windows |
Provides platform-specific APIs for Windows. |
Qt X11 Extras |
All |
Linux/X11 |
Provides platform-specific APIs for X11. |
Qt XML |
C++ implementations of SAX and DOM. Note: This module is not required to use QXmlStreamReader and QXmlStreamWriter. They are already part of Qt Core. |
||
Qt XML Patterns |
Support for XPath, XQuery, XSLT and XML schema validation. |
||
Qt Wayland Compositor |
Linux |
Linux and Boot to Qt targets. |
Provides a framework to develop a Wayland compositor. |
Qt Charts |
All |
UI Components for displaying visually pleasing charts, driven by static or dynamic data models. |
|
Qt Data Visualization |
All |
All |
UI Components for creating stunning 3D data visualizations. |
Qt Virtual Keyboard |
All |
Linux and Windows desktop, and Boot to Qt targets. |
A framework for implementing different input methods as well as a QML virtual keyboard. Supports localized keyboard layouts and custom visual themes. |
增值模块(Value-Add Modules)
除了随Qt5发布的上述这些模块之外,还有一些模块是单独发布的,这些模块只在商业版许可的Qt中才有。
特性 |
描述 |
Qt for Device Creation |
Tools for fast, easy, and fully-integrated embedded device application development. Includes most other Value-Add features. |
Qt Quick Compiler |
Enables compiling .qml source files into application binaries, improving load times and security for code assets. |
技术预览模块(Technology Preview Modules)
技术预览模块是一些还处于开发测试阶段的模块。一般来说,技术预览模块中的类在经过几个版本发布后会变成正式模块。例如,Qt5.9中技术预览模块有:
模块 |
描述 |
Qt Network Authorization |
Provides support for OAuth-based authorization to online services. |
Qt Speech |
Provides support for accessibility features such as text-to-speech. |
Qt Remote Objects |
Provides an easy to use mechanism for sharing a QObject's API (Properties/Signals/Slots) between processes or devices. |
Qt工具(Qt Tools)
Qt工具在所有支持的平台上都可以使用,用于帮助应用程序的开发和设计。
工具 |
描述 |
Qt Designer |
Classes for extending Qt Designer. |
Qt Help |
Classes for integrating online documentation into applications, similar to Qt Assistant. |
Qt UI Tools |
Classes to handle the forms created in Qt Designer. |