Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.1, 5.15.1
-
macOS 10.14.3
-
-
115bcdb862ec52ebda04e1337f978096d8879e6d (qt/qtbase/dev) e255716291183ac374a14314f7acf07cbb681223 (qt/qtbase/6.0) 82220c743a77d81c74935c8a9b36c13016968fb3 (qt/tqtc-qtbase/tqtc/lts-5.15)
Description
The attached sample app brings up two windows, derived from QMainWindow and a QWidget, respectively. If you see them as two tabs (depending on your "System Preferences|Dock|Prefer tabs when opening documents" setting, drag them apart.
On the window titled "5.12.1 (main window)", click the "Open Sheet (main window)" button. A window modal QDialog (actually a sheet on mac) will open. On the menu bar under the File menu, note that "Item 1" and "Item 2" are disabled, as they should be.
Now make "5.12.1 (other window)" active and look under the File menu again. Both "Item 1" and "Item 2" should be enabled, but are not.
Notice that if you reverse the process, starting with "5.12.1 (other window)", opening its window modal sheet, and switching to "5.12.1 (main window)", the File menu items are correctly enabled.
If you modify main.cpp so both windows derive from MainWindow, rebuild, and run the app, you'll see that the File menu items remain enabled in all cases. Oddly, our real-world app behaves like the QMainWindow/QWidget case, even with two QMainWindows! Nonetheless, the menus shouldn't be behaving as though the open sheet is application modal when in fact it's window modal.