PDA

View Full Version : mainwindow disappearing



locus
28th January 2007, 01:55
Quick question:

Can a main window widget be invoked from pressing a button on a dialog?

i would like to do this, but when i try, the mainwindow, appears and then disappears.




void to_begin::on_okButton_clicked(){
MainWindow w;
w.show();
}



to_begin is a class that inherits the dialog as well as QDialog, and the dialog form on which ok_Button is located.

wysota
28th January 2007, 10:24
Look into the FAQ (http://www.qtcentre.org/forum/faq.php?faq=qt_general_category#faq_qt_stack_creat ed_widgets).