Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.3.1, 6.5.2
-
None
-
Qt 6.5.2 and 6.3.1
Qt Creator 11.0.0
macOS 12.6.4
-
-
e66cbdf68 (dev), 3ef96cc18 (6.6), 09d561b07 (6.5), af43fa46d (tqtc/lts-6.2)
Description
There's a crash on macOS if the app loses focus immediately after a QMenu sub-menu item is selected. The QMenu has Qt::WA_DeleteOnClose set and is displayed using QMenu::Popup().
- Build and run the attached sample project. (20230731-1001.zip.)
- Click the Show menu button to show a context menu.
- Position the mouse cursor over a window from another app.
- Use the keyboard arrow keys to navigate to the Fruit > Apple sub-menu item.
- Press the space key (to select the menu item) and immediately click the left mouse button (to switch focus to the other app).
- The sample app crashes.
I've tested Qt 6.3.1 and 6.5.2 and the same happens in both.
Possibly related: QTBUG-82349.