From 44aeffa160b7e55b8e4b92f2ede3d7bd5de1a0ab Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Fri, 3 Sep 2021 11:10:53 +0200 Subject: [PATCH] feat(StatusBaseInput): add keyReleased signal This is so that we can get notified when keys on the text edit were released. Unfortunately we don't seem to be able to attach to `Keys.onReleased` from outside of the component. Closes #372 --- src/StatusQ/Controls/StatusBaseInput.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/StatusQ/Controls/StatusBaseInput.qml b/src/StatusQ/Controls/StatusBaseInput.qml index 98b80687..c7989a66 100644 --- a/src/StatusQ/Controls/StatusBaseInput.qml +++ b/src/StatusQ/Controls/StatusBaseInput.qml @@ -52,6 +52,8 @@ Item { name: "" } + signal keyReleased() + implicitWidth: 448 implicitHeight: multiline ? Math.max(edit.implicitHeight + topPadding + bottomPadding, 44) : 44 @@ -162,6 +164,10 @@ Item { } } + Keys.onReleased: { + statusBaseInput.keyReleased(); + } + onTextChanged: { statusBaseInput.dirty = true if (statusBaseInput.maximumLength > 0) {