QStyleFactory Class
QStyleFactory 类用于创建QStyle 对象。更多内容...
| 头文件: | #include <QStyleFactory> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake: | QT += widgets |
静态公共成员
详细说明
QStyle 类是一个抽象基类,用于封装GUI的外观和风格。QStyleFactory通过调用create()函数并传入一个标识样式的键,来创建QStyle 对象。这些样式可以是内置的,也可以从样式插件中动态加载(参见QStylePlugin )。
请使用keys()函数获取有效的键。内置样式(通常为“windows”和“fusion”)始终可用。 平台样式属于插件,仅在对应平台上可用:遵循 Windows 11 Fluent 设计的“windows11”,以及 Windows 系统上的“windowsvista”、macOS 系统上的“macos”和 Android 系统上的“android”。这些键不区分大小写。
另请参阅 QStyle 。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.