En esta página

StyleKit QML Type

Un singleton para configurar y acceder al estilo actual. Más información...

Import Statement: import Qt.labs.StyleKit
Status: Technology preview

Este tipo se encuentra en fase de vista previa tecnológica y está sujeto a cambios.

Propiedades

Métodos

Descripción detallada

StyleKit Es un singleton que permite 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 global de StyleKit y la depuración.

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

Véase también Style y StyleVariation.

Documentación de propiedades

debug : StyleKitDebug [read-only]

Una herramienta de depuración en tiempo de ejecución que permite rastrear las propiedades de estilo de un Control específico.

style : Style

El estilo activo de la aplicación.

Establece esto en una instancia de Style para aplicarlo a todos los controlesQt 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
        }
    }
}

Nota: Para obtener el mejor rendimiento al iniciar la aplicación, establece el estilo en el ` ApplicationWindow` raíz, antes que en cualquier control secundario.

Véase también « styleUrl » y « Style ».

styleUrl : url

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

Véase también style.

transitionsEnabled : bool

Determina si las transiciones están activadas de forma global.

Establece este valor 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 tanto el ` style ` activo como su ` theme ` actual han terminado de cargarse. Esto puede utilizarse para aplazar la lógica de inicialización que dependa de propiedades de estilo ya 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.