-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.5.0
-
None
-
Windows 7 and MAC OS X and Linux
1. create MainWindow with menu bar on the top with any actions (aka "open", "close" or any)
2. add QQuickView to the central widget of MainWindow using
QWidget::createWindowContainer(quickview);
3. In qml file create Item with keyboard focus, like this:
onFocusChanged: console.log("focus changed to ", focus);
onActiveFocusChanged: console.log("active focus changed", activeFocus);
Keys.onPressed: console.log("pressed: ", event.key);
Keys.onReleased: console.log("released: ", event.key);
4. Run application, press any button and while this button is pressed - open menu of mainWindow. While menu is opened - release pressed button.
5. No signals "active focus changed" or "key released" emitted.
Other description: using event(QEvent*event) method of QQuickiView. In this case wi will not receive FocusOutEvent or KeyReleaseEvent when menu is opened and button released.
Reason:
QApplication::OpenPopup send FocusOut event only to focus widget, but the QQuickView is a focusWindow;