Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

GroupBox styling

$
0
0
sfabry thank you for the example. vitala you can add Style into you GroupBox without adding new style file. Here is what I’ve made from sfabry’s example. main.qml import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0   ApplicationWindow {     title: qsTr("Hello World")     width: 640     height: 480       GroupBox {         anchors.centerIn: parent         style: Style {             property Component panel: Rectangle {                 Text {                     anchors.horizontalCenter: parent.horizontalCenter                     anchors.bottom: parent.top                     text: control.title                     color: control.enabled ? "red" : "gray"                     renderType: Text.NativeRendering                     font.italic: !control.enabled                     font.weight: Font.Bold                     font.pointSize: 18                 }             }         }         title: qsTr("The Title in Red")         enabled: true           Column {             spacing: 2             CheckBox {                 text: qsTr("Update system")             }             CheckBox {                 text: qsTr("Update applications")             }             CheckBox {                 text: qsTr("Update documentation")             }         }     } }

Viewing all articles
Browse latest Browse all 4972

Trending Articles