Results 1 to 2 of 2

Thread: How to check if a qwidget is closed ?

  1. #1
    Join Date
    Jul 2011
    Posts
    16
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to check if a qwidget is closed ?

    I have a parent widget A and a child widget B, and the user has the capability to open and close widget B from widget A. How can I check is widget B is closed ?

    I show widget B using the show command.

    One of the things i am thinking to do is passing a variable to the constructor of widget B then update its value in the CloseEvent, but i am pretty sure there is an easier way.

    Many thanks in advance,

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to check if a qwidget is closed ?

    Have you tried QWidget::visible()?

Similar Threads

  1. How to check if QWidget is overlapped by other windows
    By arturo182 in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2010, 09:54
  2. Replies: 6
    Last Post: 17th September 2010, 08:15
  3. Qt 4.2.2 static - *CLOSED*
    By maxpower in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2007, 08:08
  4. QDomDocument - closed nodes?
    By naresh in forum Qt Programming
    Replies: 2
    Last Post: 19th April 2006, 08:10
  5. delete sub windows when they are closed?
    By Dark_Tower in forum Newbie
    Replies: 3
    Last Post: 21st March 2006, 18:50

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.