I'm using Qt 4.4 and my application opens a modeless QDialog that refreshes its contents every 5 seconds using a timer. That is working just fine, but I would like to have the refresh not happen when the dialog is not visible.
I've tried using isVisible()
/isHidden()
and showEvent(QTimerEvent *event)
/hideEvent(QTimerEvent *event)
but those seem to only indicate when it is first popped up or minimized and reveal no information about when it is behind the main window of the application.
isActiveWindow()
seems to indicate a slightly related idea, but if possible, I would like to have the window refresh if it's open next to the main window and still visible but not actively being used by the user.