Results 1 to 4 of 4

Thread: windows still exists after closeAllSubWindows()

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2015
    Location
    California, USA
    Posts
    61
    Thanks
    43
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11

    Default windows still exists after closeAllSubWindows()

    Any idea why a window is found by mdiArea->currentSubWindow()
    directly after mdiArea->closeAllSubWindows()?
    mdiArea is a class member for a QMainWindow subclass.

    The windows appear to have been closed after the function (QMainWindow::closeEvent) returns.
    And the next time the function runs it will find the currentSubWindow to be null.

    Qt Code:
    1. mdiArea->closeAllSubWindows();
    2. qDebug() << mdiArea->subWindowList().length();
    To copy to clipboard, switch view to plain text mode 

    If I have 2 sub-windows open,
    the debug ouput is 2.

    Qt 5.5 / win 7
    Last edited by ravas; 27th October 2015 at 08:55.

Similar Threads

  1. detect if a URL exists or not
    By timmu in forum Qt Programming
    Replies: 5
    Last Post: 27th January 2013, 13:16
  2. File exists on server
    By Chops211 in forum Qt Programming
    Replies: 5
    Last Post: 6th August 2011, 20:22
  3. Replies: 2
    Last Post: 21st February 2011, 14:52
  4. Replies: 1
    Last Post: 1st September 2010, 10:23
  5. Does anyone know if anything like this exists for Qt
    By Jachyra in forum Qt Programming
    Replies: 3
    Last Post: 8th February 2007, 22:06

Tags for this Thread

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.