Hi !
I also have the problem with the systrayicon and minimize
so i try following ...
// Overload original event-handler:
bool MainWindow
::event(QEvent *evt
) {
// Check if Window-State changed to minimize ...
if(evt
->type
() == QEvent::WindowStateChange) {
//Now check to see if the window is minimised
if (isMinimized())
{
// Call the Hide Slot after 250ms
// to prozess other events ....
qApp->processEvents();
QTimer::singleShot(250,
this,
SLOT(hide
()));
evt->ignore();
}
}
// Call original-handler (in this case QMainWindow ...)
}
// Overload original event-handler:
bool MainWindow::event(QEvent *evt)
{
// Check if Window-State changed to minimize ...
if(evt->type() == QEvent::WindowStateChange)
{
//Now check to see if the window is minimised
if (isMinimized())
{
// Call the Hide Slot after 250ms
// to prozess other events ....
qApp->processEvents();
QTimer::singleShot(250, this, SLOT(hide()));
evt->ignore();
}
}
// Call original-handler (in this case QMainWindow ...)
return QMainWindow::event(evt);
}
To copy to clipboard, switch view to plain text mode
... this work's on windows !
Bookmarks