このページでは

StyleKit QML Type

現在のスタイルを設定およびアクセスするためのシングルトン。詳細...

Import Statement: import Qt.labs.StyleKit

プロパティ

方法

詳細説明

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 Controls.

// 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 : string

URL からStyle をロードするstyle の代替。

styleも参照のこと

transitionsEnabled : bool

トランジションをグローバルに有効にするかどうかを制御します。

現在のスタイルですべてのトランジションを無効にするには、これをfalse に設定します。

デフォルト値はtrue です。

ControlStyle::transitionも参照してください

メソッドのドキュメント

bool styleLoaded()

ア ク テ ィ ブなstyle と そのカ レ ン トtheme の両方の読み込みが終了 し た と き にtrue を返 し ます。これは、解決されたスタイル プロパティに依存する初期化ロジックを延期するために使用できます。

style およびthemeも参照してください

© 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.