I want to display a dialog at startup of my program, For this purpose I create a new Qt Designer Form Class called Dialog.
In main.cpp I have the following code which executes the Dialog class:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Dialog diag ;
diag.show() ;
return a.exec();
}
The Dialog class contains an "OK" button. When user pushes that button the Dialog Window close and the MainWindow opens. For this I code it like this:
void Dialog::on_ok_butt_clicked()
{
MainWindow w ;
w.show() ;
}
but the MainWindow window not displaying... how can I solve this problem?
MainWindow w ; w.show();toMainWindow* w= new MainWindow; w->show();