alex chpenst
10th July 2008, 22:31
Hi,
I have a dialog that is started from a context menu of my application. The problem is that when I close the dialog, my application closes as well. How do I make a dialog such that the main application stays running when the dialog is closed? (I open the dialog with a parent widget=0. MyDialog inherits QDialog. My main application is a tray icon on the panel with a context menu).
Thanks a lot!
Alex.
MainApplication::MainApplication()
{
...
myDialog = 0;
}
void MainApplication:: openDialog() {
if (!myDialog)
myDialog = new MyDialog;
myDialog->show();
}
I have a dialog that is started from a context menu of my application. The problem is that when I close the dialog, my application closes as well. How do I make a dialog such that the main application stays running when the dialog is closed? (I open the dialog with a parent widget=0. MyDialog inherits QDialog. My main application is a tray icon on the panel with a context menu).
Thanks a lot!
Alex.
MainApplication::MainApplication()
{
...
myDialog = 0;
}
void MainApplication:: openDialog() {
if (!myDialog)
myDialog = new MyDialog;
myDialog->show();
}