Results 1 to 7 of 7

Thread: MdiSubWindows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Sep 2011
    Posts
    45
    Thanks
    17
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: MdiSubWindows

    Sorry, guys about that, my mistake. OK, here is the code:
    Qt Code:
    1. foreach(QMdiSubWindow *sub, this->mdiWin->subWindowList())
    2. {
    3. if(sub->isActiveWindow())
    4. {
    5. sub->close();
    6. break;
    7. }
    8. }
    To copy to clipboard, switch view to plain text mode 

    So in this case the window, which was opened first, will be closed, even it's not an active window. In this code "this" - is window, which central widget is MdiArea's object (mdiWin). In each sub-window we have a simple widget, let's say, PushButton.
    Last edited by DmitryNik; 28th September 2011 at 07:18.

Similar Threads

  1. Scale MdiSubWindows after Dockwidget hide()
    By Ginsengelf in forum Qt Programming
    Replies: 3
    Last Post: 6th August 2009, 14:00

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
  •  
Qt is a trademark of The Qt Company.