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:
Qt Code:
  1. Preferences *pPreferences = new Preferences(this);
  2. if(pPreferences) {
  3. pPreferences->setAttribute(Qt::WA_DeleteOnClose);
  4. pPreferences->exec();
  5. }
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:
Qt Code:
  1. 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