PDA

View Full Version : closing a Qdialog called from a Qdialog



OverTheOCean
27th September 2009, 23:41
Hi,

l did some research on the forum and didn't find the solution so here we go.

My main application is a Qdialog ( to display graph using qwt), from there l open other Qdialog ( graph proerties and so on). I open the "child dialog" with .exec(), and l call accept() in the "childtdialog"to close them.

my issue is when l close the child dialog, it close the main Qdialog.

I added QApplication::setQuitOnLastWindowClosed(false); in my main function, it doesn't work.

any idea ?

thanks,

Michael

wysota
27th September 2009, 23:56
Please provide a minimal compilable example reproducing the problem.

OverTheOCean
28th September 2009, 03:10
wysota,

attached is my class using .ui for the Plot2D_Dialog l 'm opening

from my main dialog l do
"
Plot2D_Dialog * plot_2D_properties = new Plot2D_Dialog(config,list_of_graph,this);
plot_2D_properties->Load_Default();
plot_2D_properties->exec();
"
config and graph being defined in plot2d_dialog.h ( included in the zip).

then l close my plot2d_dialog by calling Plot2D_Dialog::reject();

wysota
28th September 2009, 08:02
One can hardly call that a compilable example... I was more interested in your main() function,