Results 1 to 3 of 3

Thread: Way to detect if a window is hidden/closed

  1. #1

    Default Way to detect if a window is hidden/closed

    I am making an interface to launch emulators.
    The problem is some emulators are tricky and can't start if the interface window is still opened.
    So i need to hide it (or perhabs close it).
    But if i just call hide() or close() just before launching the emulator, the window is still opened.
    Do i need to call a refresh function, or is there an event to wait to be sure that the window really dissapeared from the screen ?

  2. #2

    Default Re: Way to detect if a window is hidden/closed

    The same thing goes with testing if a window has borders, or if it has the right size.
    I try to resize the window in c++, and it turns out that when the system is busy, Qt sees a wrong size 90% of the time...

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Way to detect if a window is hidden/closed

    Hmm, if you create the window in C++ you could try to override the closeEvent() method.
    In there you first call the base class implementation and then emit a signal that notifies QML that closeEvent() has been processed.

    Cheers,
    _

Similar Threads

  1. Replies: 10
    Last Post: 6th August 2012, 01:46
  2. QLayout on hidden window
    By benacler in forum Qt Programming
    Replies: 0
    Last Post: 2nd September 2008, 19:04
  3. Replies: 11
    Last Post: 4th June 2008, 08:22
  4. [SOLVED] detecting when a mdi window is closed
    By elcuco in forum Qt Programming
    Replies: 8
    Last Post: 9th September 2006, 21:50
  5. Replies: 3
    Last Post: 23rd July 2006, 19:02

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.