Results 1 to 2 of 2

Thread: Event - closing/activate window

  1. #1
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Event - closing/activate window

    Hi,
    I have a mainwindow which need to know if any of the other objects that have an own window, for example a reportwindow is activated or closed. If the reportwindow is activated, the mainwindow change state and look(widgetstack). Same thing if the report is beeing closed, the mainwindow should go to previous state and look.

    All that is ok, but if the report is open, but not activated and I'm doing something in the mainwindow and think that the report doesn't have to be open. Then I can close the report directly by pushing the 'X'-button in the upper-right corner of the reportwindow, if its visible, if it's not visible - this is not a problem
    The problem is that the event windowActivated will be sent first, followed by a closeEvent. Then I get some bad flickering on the screen, as the mainwindow first change state to fit the report, then closing it and retrieving the previous state.

    Is there a nice solution on this little, but annoying problem?

    Thanks,
    Chaimar

  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: Event - closing/activate window

    Maybe you could use a timer and only change the state if it persists over a second or so?

Similar Threads

  1. Workload in a QThread blocks main application's event loop ?
    By 0xBulbizarre in forum Qt Programming
    Replies: 14
    Last Post: 9th April 2006, 21:55
  2. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 10:21
  3. How to propagate from one class to another
    By mahe2310 in forum Qt Programming
    Replies: 15
    Last Post: 20th March 2006, 01:27
  4. Replies: 4
    Last Post: 23rd January 2006, 16:51
  5. What's the relationship between signal/slot and event?
    By twosnowman in forum Qt Programming
    Replies: 4
    Last Post: 11th January 2006, 17:13

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.