Results 1 to 2 of 2

Thread: Update menu items on switching MDI subwindows

  1. #1
    Join Date
    Sep 2007
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Update menu items on switching MDI subwindows

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Update menu items on switching MDI subwindows

    Create a custom slot connected to QMdiArea::subWindowActivated() and update all actions there.

  3. The following user says thank you to wysota for this useful post:

    John_P (16th March 2008)

Similar Threads

  1. How to update scene after removing items
    By nileshsince1980 in forum Qt Programming
    Replies: 4
    Last Post: 20th September 2007, 09:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.