StyleKit QML Type
現在のスタイルを設定および取得するためのシングルトンです。詳細...
| Import Statement: | import Qt.labs.StyleKit |
| Status: | Technology preview |
この型はテクノロジープレビュー段階にあり、変更される可能性があります。
プロパティ
- debug : StyleKitDebug
- style : Style
- styleUrl : url
- transitionsEnabled : bool
方法
- bool styleLoaded()
詳細な説明
StyleKit アプリケーションのStyle を設定するためのシングルトンです。
// Main.qml
import QtQuick
import Qt.labs.StyleKit
ApplicationWindow {
id: app
width: 1024
height: 800
visible: true
// Assign the style to be used
StyleKit.style: PlainStyle {}
// Controls are used as normal
Column {
anchors.fill: parent
anchors.margins: 10
spacing: 10
Button {
text: "Button"
}
Slider {
width: 200
}
}
}また、StyleKitのグローバルな設定やデバッグのためのプロパティも提供します。
注: Qt.labs モジュール内の型は、将来のバージョンでも互換性が維持されるとは限りません。
Style およびStyleVariationも参照してください 。
プロパティのドキュメント
debug : StyleKitDebug [read-only]
特定のControl のスタイルプロパティを追跡するために使用できる、実行時デバッグツールです。
style : Style
アプリケーションのアクティブなスタイル。
これをStyle インスタンスに設定すると、すべてのQt Quick コントロールに適用されます。
// Main.qml
import QtQuick
import Qt.labs.StyleKit
ApplicationWindow {
id: app
width: 1024
height: 800
visible: true
// Assign the style to be used
StyleKit.style: PlainStyle {}
// Controls are used as normal
Column {
anchors.fill: parent
anchors.margins: 10
spacing: 10
Button {
text: "Button"
}
Slider {
width: 200
}
}
}注: 起動時のパフォーマンスを最適化するには 、子コントロールよりも先に、ルートApplicationWindow のスタイルを設定してください。
「 styleUrl 」および「Style 」も参照してください 。
styleUrl : url
style の代替として、URL からStyle を読み込むものです。
styleも参照してください 。
transitionsEnabled : bool
トランジションをグローバルに有効にするかどうかを制御します。
これを `false ` に設定すると、現在のスタイル内のすべてのトランジションが無効になります。
デフォルト値は `true` です。
「ControlStyle::transition」も参照してください 。
メソッドのドキュメント
bool styleLoaded()
アクティブなstyle とその現在のtheme の両方の読み込みが完了すると、true を返します。これは、解決済みのスタイルプロパティに依存する初期化ロジックを遅延させるために使用できます。
© 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.