41 lines
760 B
QML
41 lines
760 B
QML
|
|
import QtQuick
|
||
|
|
import QtQuick.Controls
|
||
|
|
import QtQuick.Layouts
|
||
|
|
|
||
|
|
Item {
|
||
|
|
width: parent.width/parent.childcount
|
||
|
|
property var col: ""
|
||
|
|
property var value: "0"
|
||
|
|
property var text: "0"
|
||
|
|
onTextChanged: {
|
||
|
|
if(text == "1")
|
||
|
|
sw.checked = true
|
||
|
|
else
|
||
|
|
sw.checked = false
|
||
|
|
}
|
||
|
|
height: 30
|
||
|
|
clip: true
|
||
|
|
Rectangle{
|
||
|
|
width: 1
|
||
|
|
height: parent.height
|
||
|
|
color: "#222"
|
||
|
|
anchors.right: parent.right
|
||
|
|
}
|
||
|
|
Rectangle{
|
||
|
|
width: parent.width
|
||
|
|
height: 1
|
||
|
|
color: "#222"
|
||
|
|
anchors.bottom: parent.bottom
|
||
|
|
}
|
||
|
|
|
||
|
|
Switch {
|
||
|
|
id: sw
|
||
|
|
anchors.centerIn: parent
|
||
|
|
checked: false
|
||
|
|
onCheckedChanged: parent.value = (checked? "1": "0")
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|