Nesta página

AbstractStyle QML Type

Tipo base abstrato com propriedades comuns tanto ao Style quanto ao Theme. Mais...

Import Statement: import Qt.labs.StyleKit
Inherits:

StylableControls

Inherited By:

Style and Theme

Status: Technology preview

Este tipo está em pré-visualização tecnológica e está sujeito a alterações.

Propriedades

Descrição detalhada

O AbstractStyle contém propriedades, como fontes e paletas, que são comuns tanto a um Style quanto a um Theme.

Observação: não há garantia de que os tipos nos módulos do Qt.labs permanecerão compatíveis em versões futuras.

Documentação das propriedades

fonts : StyleFont

Propriedade agrupada para configuração por controle fonts. É possível definir fontes para tipos específicos de controles, como botão, campo de texto ou rótulo.

Style {
    fonts {
        system.pixelSize: 14
        button.bold: true
        textField.family: "Monospace"
    }
}

palettes : StylePalette

Propriedade agrupada para configuração por controle palettes. As paletas podem ser definidas para todo o sistema ou para tipos de controle específicos.

light: Theme {
    palettes {
        system {
            window: "gainsboro"
            windowText: "black"
        }
        button.buttonText: "black"
        textField.text: "#4e4e4e"
    }
}

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