Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.2.1, 5.7.0
Description
I have an application with a StackView. One page is a list and has a filter inputbox. The page listens for Stack.status and when it gets Inactive, the inputMethod is hidden.
This does not return focus to the the StackView, however, which handles the back button (the app will exit now when tapping the back button instead of popping the StackView). To prevent this, I wanted to listen for the onVisibleChanged and if the inputMethod is not visible, forceActiveFocus() on the StackView.
StackView { id: pageView anchors.fill: parent focus: true Connections { target: Qt.inputMethod onVisibleChanged: { if (!Qt.inputMethod.visible) { pageView.forceActiveFocus() } } } Keys.onReleased: { if (event.key === Qt.Key_Left && (event.modifiers & Qt.AltModifier)) { if (pageView.depth > 1) { pageView.pop() event.accepted = true } else { event.accepted = false // fallthrough and Qt closes the app } } } }
As soon as I tap the input box on the page, the application freezes, both on a Nexus 5 (Android 4.4) and iPod touch (iOS 6.1) with a debug message
W/IInputConnectionWrapper( 7977): getCursorCapsMode on inactive InputConnection
, the keyboard appears two seconds later and another 5 seconds later the app is terminated with SIGABRT.
Attachments
Issue Links
- relates to
-
QTBUG-40750 Deadlock when using Qt.inputMethod.visible on Android
-
- Closed
-