From 727526b39a524946bf981b8c7f65b8d78dcf367e Mon Sep 17 00:00:00 2001 From: Cyril Anisimov Date: Sun, 15 Jun 2025 18:57:44 +0200 Subject: [PATCH] add focus to `CheckBoxType` --- client/ui/qml/Controls2/CheckBoxType.qml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/client/ui/qml/Controls2/CheckBoxType.qml b/client/ui/qml/Controls2/CheckBoxType.qml index 9c89986f..451fe01d 100644 --- a/client/ui/qml/Controls2/CheckBoxType.qml +++ b/client/ui/qml/Controls2/CheckBoxType.qml @@ -34,6 +34,32 @@ CheckBox { property string imageSource: "qrc:/images/controls/check.svg" + property bool isFocusable: true + + Keys.onTabPressed: { + FocusController.nextKeyTabItem() + } + + Keys.onBacktabPressed: { + FocusController.previousKeyTabItem() + } + + Keys.onUpPressed: { + FocusController.nextKeyUpItem() + } + + Keys.onDownPressed: { + FocusController.nextKeyDownItem() + } + + Keys.onLeftPressed: { + FocusController.nextKeyLeftItem() + } + + Keys.onRightPressed: { + FocusController.nextKeyRightItem() + } + hoverEnabled: enabled ? true : false focusPolicy: Qt.NoFocus