hello, everyone!
I designed a program, I use F12 to invoke its minimize to try action. And the user can restore the window with tray icon menu.
I use a slot function as follows:
void mainwindow:: minimizetotraySlot()
{
if (isHidden())
{
show();
trayIcon->hide();
}
else
{
hide();
trayIcon->show();
}
}
void mainwindow:: minimizetotraySlot()
{
if (isHidden())
{
show();
trayIcon->hide();
}
else
{
hide();
trayIcon->show();
}
}
To copy to clipboard, switch view to plain text mode
And I define a tray icon menu as
restore, quit, about.
however, when I select the about item in the tray icon menu, after the about dialog displayed, the application will quit. I don't know why? The about dialog is only a common MessageBox.
Bookmarks