Dialog is showed and immediatly closed because out of scope. Try something like this :
Qt Code:
void MainWindow::actionTest() { Dialog *dlg = new Dialog(); //to auto delete after close dlg->setAttribute( Qt::WA_DeleteOnClose, true ); dlg->show(); }To copy to clipboard, switch view to plain text mode
Bookmarks