Добавил кнопку с градиентом

This commit is contained in:
2018-07-24 12:02:04 +02:00
parent c624c23fee
commit f6a03e1565
5 changed files with 73 additions and 10 deletions

View File

@@ -5,17 +5,45 @@ Item {
id: root
property string title: ""
property var lights: []
property QtObject lights: undefined
Rectangle {
width: parent.width
height: 20
Column {
width: root.width
color: "green"
spacing: 5
Label {
text: root.title
anchors.centerIn: parent
GradientButton {
width: root.width
height: 40
visible: Boolean(root.title)
radius: 5
Label {
text: root.title
anchors.centerIn: parent
}
}
Row {
id: buttonsRow
width: root.width
height: childrenRect.height
spacing: 5
Repeater {
model: root.lights
width: root.width
GradientButton {
width: (root.width - buttonsRow.spacing * (root.lights.count - 1)) / root.lights.count
height: width / 2
radius: 5
}
}
}
}
}