Hey @all,
I'Ve an application with an system tray icon. When the application is hidden and i open and close a dialog from the context menu of the tray icon, then the complete application is closed.
Here is how i open the preference dialog for example:
Preferences *pPreferences = new Preferences(this);
if(pPreferences) {
pPreferences->setAttribute(Qt::WA_DeleteOnClose);
pPreferences->exec();
}
Preferences *pPreferences = new Preferences(this);
if(pPreferences) {
pPreferences->setAttribute(Qt::WA_DeleteOnClose);
pPreferences->exec();
}
To copy to clipboard, switch view to plain text mode
and in the preference dialog I've the following to close it, if the button "Close" was pressed:
connect(m_ui->btnClose, SIGNAL(clicked()), this, SLOT(close()));
connect(m_ui->btnClose, SIGNAL(clicked()), this, SLOT(close()));
To copy to clipboard, switch view to plain text mode
So, when I press the "Close" button from the preference dialog, then the complete application is closed. The tray icon is gone when i move the mouse cursor over it.
I hope someone could help me please
Best Regards
NoRulez
Bookmarks