If I put a widget like QPushButton via QWidgetAction into the context menu of a menu bar icon on macOS, the button will be shown on the first time I open the menu, but next time it will be invisible until I manually click on it. Obviously if I open the menu again, the button will be hidden as before.
I have tested this on almost all Qt version from 5.7.1 and all of them seem to be affected.
The OS was macOS 10.13.
Steps to reproduce:
- Download and compile the attached test application
- Run the application, a green Qt logo will appear on the menu bar
- Click on the small Qt logo on the menu bar, the context menu will appear with the button in it
- Close the context menu by clicking somewhere else
- Open the context menu again by clicking on the menu bar icon
Expected: the button is visible
Actual: the button is invisible and shows only when you click on it