mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 20:42:56 +02:00
24 lines
502 B
QML
24 lines
502 B
QML
import QtQuick 2.5
|
|
import QtQuick.Controls 1.4 as Original
|
|
import "."
|
|
|
|
Preference {
|
|
id: root
|
|
height: checkBox.implicitHeight
|
|
|
|
Component.onCompleted: {
|
|
checkBox.checked = preference.value;
|
|
preference.value = Qt.binding(function(){ return checkBox.checked; });
|
|
}
|
|
|
|
function save() {
|
|
preference.value = checkBox.checked;
|
|
preference.save();
|
|
}
|
|
|
|
Original.CheckBox {
|
|
id: checkBox
|
|
anchors.fill: parent
|
|
text: root.label
|
|
}
|
|
}
|