Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.1, 5.9.2, 5.10.0 Alpha
-
-
e02d758c9509de31aafc82d53296f1acdab55151 (qt/qtbase/5.12.0)
Description
I would like to use a custom widget in the context menu of a menu bar icon. If I add this custom widget (e.g. a simple QPushButton) to the context menu via QWidgetAction and open it, an empty dummy window appears (see the attached screenshot). If i close that window, the custom widget disappears from the context menu.
Qt 5.7 and 5.8 seem to be unaffected.
macOS 10.13 affected as well.
Steps to reproduce on macOS 10.12.6:
- Download and compile the attached test application
- Run the application
- Click on the small "Qt" logo on the menu bar
- The context menu appears with a button in it
Expected: no additional window is visible
Actual: there is a small empty window in the center of the screen
Attachments
For Gerrit Dashboard: QTBUG-63443 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
207892,4 | macOS: Mark the widget's container as embedded when placed into NSMenuItem | 5.10 | qt/qtbase | Status: MERGED | +2 | 0 |
243464,3 | macOS: Treat explicitly set Qt::SubWindows as not needing a NSWindow | 5.12.0 | qt/qtbase | Status: MERGED | +2 | 0 |