I tried setting the Shortcut context of my QAction to Qt::ApplicationShortcut but it didn't help. pressing ctrl+w is still closing only one mdi window instead of all.
I noticed that there is this line in my compiler:
QAction::eventFilter: Ambiguous shortcut overload: Ctrl+W
In the meanwhile i tried to install a eventfilter in my QMainWindow derivative and to catch the QKeySequence::Close event and to replace it with my own slot.
but it seems that the standard shortcut is handled before the eventfilter in some way. so the result is that the application first closes the focused mdi child and then triggers the slot?
btw: yes this problem is only on windows. on mac there isn't such a problem...
there is also another problem concerning alt+f4:
i have dockwidgets and toolbars in my application.
when i undock the toolbars and then press alt+f4 the toolbar is hidden instead of closing the application. the same is with dockwidgets. i tried it in the examples and the result was the same(dockwidgets, mdi, sdi example). is there a property to set?
Bookmarks