InputPanel: intercepting Enter key
-
I thought I'd looked thoroughly before asking this, but...after posting, I found the answer:
Dialog { property string inputText: "" signal okPressed(string newTextField) TextField { text: inputText EnterKeyAction.enabled: true Keys.onReleased: (event) => { if (event.key === Qt.Key_Return) okPressed(inputText) } ... -
M mzimmers has marked this topic as solved on
-
I thought I'd looked thoroughly before asking this, but...after posting, I found the answer:
Dialog { property string inputText: "" signal okPressed(string newTextField) TextField { text: inputText EnterKeyAction.enabled: true Keys.onReleased: (event) => { if (event.key === Qt.Key_Return) okPressed(inputText) } ...