En esta página

StyleKit QML Type

Un singleton para establecer y acceder al estilo actual. Más...

Import Statement: import Qt.labs.StyleKit

Propiedades

Métodos

Descripción detallada

StyleKit es un singleton para configurar la aplicación 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
        }
    }
}

También proporciona propiedades para la configuración y depuración global de StyleKit.

Nota: No se garantiza que los tipos de los módulos Qt.labs sigan siendo compatibles en futuras versiones.

Véase también Style y StyleVariation.

Documentación de propiedades

debug : StyleKitDebug [read-only]

Herramienta de depuración en tiempo de ejecución que puede utilizarse para rastrear las propiedades de estilo de un sitio web específico Control.

style : Style

El estilo activo para la aplicación.

Establézcalo en una instancia de Style para aplicarlo a todos los estilos 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
        }
    }
}

Nota: Para un mejor rendimiento de inicio, establezca el estilo en la raíz ApplicationWindow, antes de cualquier control hijo.

Véase también styleUrl y Style.

styleUrl : string

Una alternativa a style que carga un Style desde una URL.

Véase también style.

transitionsEnabled : bool

Controla si las transiciones están habilitadas globalmente.

Establézcalo en false para desactivar todas las transiciones en el estilo actual.

El valor por defecto es true.

Véase también ControlStyle::transition.

Documentación del método

bool styleLoaded()

Devuelve true cuando el style activo y su theme actual han terminado de cargarse. Esto se puede utilizar para aplazar la lógica de inicialización que depende de las propiedades de estilo resueltas.

Véase también style y 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.