QStyleFactory 类

QStyleFactory class creates QStyle 对象。 更多...

头: #include <QStyleFactory>
qmake: QT += widgets

静态公共成员

QStyle * create (const QString & key )
QStringList keys ()

详细描述

QStyleFactory class creates QStyle 对象。

QStyle class is an abstract base class that encapsulates the look and feel of a GUI. QStyleFactory 创建 QStyle 对象使用 create () 函数和键标识样式。样式要么内置,要么从样式插件动态加载 (见 QStylePlugin ).

可以检索有效键使用 keys () function. Typically they include "windows" and "fusion". Depending on the platform, "windowsxp", "windowsvista" and "macintosh" may be available. Note that keys are case insensitive.

另请参阅 QStyle .

成员函数文档编制

[static] QStyle *QStyleFactory:: create (const QString & key )

创建和返回 QStyle 对象匹配给定 key , or returns 0 if no matching style is found.

内置样式和来自样式插件的样式两者会被查询为匹配样式。

注意: 键的使用不区分大小写。

另请参阅 keys ().

[static] QStringList QStyleFactory:: keys ()

返回有效键 (即:此工厂可以创建的样式键) 的列表。

另请参阅 create ().