From 2ca1d1fb9390d8b8f7395f6f4c69d53988d9a4a9 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 20 Aug 2018 10:57:47 +0200 Subject: Toggle checkbox with return. toggle() doesn't reliably work for some reason, so we use the checked state instead. --- framework/qml/CheckBox.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'framework/qml/CheckBox.qml') diff --git a/framework/qml/CheckBox.qml b/framework/qml/CheckBox.qml index ce4df209..e0655887 100644 --- a/framework/qml/CheckBox.qml +++ b/framework/qml/CheckBox.qml @@ -26,7 +26,9 @@ T.CheckBox { implicitWidth: indicator.width implicitHeight: indicator.width - Keys.onReturnPressed: root.toggle() + Keys.onReturnPressed: { + root.checked = !root.checked + } indicator: Rectangle { width: Kube.Units.gridUnit -- cgit v1.2.3