fuzbal/Fields/Bool.qml
Timotej Lazar cb76fedcbc
Implement event model in C++
Filtering events in JS is too slow with >20,000 events. This moves the
event data model into C++.
2021-09-16 20:33:05 +02:00

26 lines
507 B
QML

// SPDX-License-Identifier: Unlicense
import QtQuick 2.12
import QtQuick.Controls 2.13
Row {
width: parent.width
property var model
property alias value: input.checked
Keys.onPressed: {
if (event.text === model.key) {
value = !value
event.accepted = true
}
}
function set(val) { value = val || false }
CheckBox {
id: input
focusPolicy: Qt.NoFocus
padding: 0
font.capitalization: Font.SmallCaps
}
}