QT8seven
5th December 2011, 00:41
I have searched all around and cannot get this to work! Attempting to call hide() within changeEvent in a way such as:
void AppWindow::changeEvent(QEvent *event)
{
if (event->type() == QEvent::WindowStateChange)
if(isMinimized())
{
hide();
}
QMainWindow::changeEvent(event);
}
causes the window to white-out rather than hide. Does anyone know why this happens or how to fix this? I am attempting to use a tray-icon on minimize, but without being able to hide will never have much success. Currently, the only way I can work around this is to use a singleShot timer to call the hide.
void AppWindow::changeEvent(QEvent *event)
{
if (event->type() == QEvent::WindowStateChange)
if(isMinimized())
{
hide();
}
QMainWindow::changeEvent(event);
}
causes the window to white-out rather than hide. Does anyone know why this happens or how to fix this? I am attempting to use a tray-icon on minimize, but without being able to hide will never have much success. Currently, the only way I can work around this is to use a singleShot timer to call the hide.