Krish_ng
8th August 2007, 06:49
I hav an application in which i show a Dialog when a key_1 is pressed.Once i enter the mainwindow i do want to delete the dialog objects.Suggest a way in which i can do the
delete of the Dialog.I hav posted sample code
this is in the constructor of mainClass
connect(buttonBar->getButton(),SIGNAL,this,SLOT(showDialog())
showDialog of mainClass look like this
showDialog()
{
buttonBar->showDialog(this);
}
The buttonBar class showDialog looks like this
showDialog(mainClass mc)
{
myDilalog=new myDialog((QWidget *)mc,mc);
myDialog->show();
}
in the mainClass eventfilter i am giving the statement:
buttonBar->showDialog(this); for keypress
where can i delete the dialog.If i tried to delete in eventfilter its showing segmentation fault
delete of the Dialog.I hav posted sample code
this is in the constructor of mainClass
connect(buttonBar->getButton(),SIGNAL,this,SLOT(showDialog())
showDialog of mainClass look like this
showDialog()
{
buttonBar->showDialog(this);
}
The buttonBar class showDialog looks like this
showDialog(mainClass mc)
{
myDilalog=new myDialog((QWidget *)mc,mc);
myDialog->show();
}
in the mainClass eventfilter i am giving the statement:
buttonBar->showDialog(this); for keypress
where can i delete the dialog.If i tried to delete in eventfilter its showing segmentation fault