PDA

View Full Version : Update menu items on switching MDI subwindows



John_P
16th March 2008, 00:20
Hi All,

Is there any mechansim for updating the toggle state of actions in the main window menu when switching MDI subwindows? For example, if text is left aligned in one subwindow and right aligned in the other, the toggle state of the alignment needs to change when each subwindow becomes active. I suppose I'm looking for the equivalent of ON_UPDATE_COMMAND_UI used in MFC.

Thanks.

John

wysota
16th March 2008, 00:48
Create a custom slot connected to QMdiArea::subWindowActivated() and update all actions there.