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も参照してください 。
メンバー関数のドキュメント
[static] QStyle *QStyleFactory::create(const QString &key)
指定されたkey に一致するQStyle オブジェクトを作成して返します。一致するスタイルが見つからない場合は、nullptr を返します。
一致するスタイルの検索には、組み込みスタイルとスタイルプラグインのスタイルの両方が対象となります。
注: キーの大文字小文字 は区別されません。
keys()も参照してください 。
[static] QStringList QStyleFactory::keys()
有効なキーのリスト、つまりこのファクトリがスタイルを作成できるキーを返します。
create()も参照してください 。
© 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.