Hello,
I have this QMainWindow form and this QDialog form that is sort of child of QMainWindow one. So when a button is cliecked in the mainWidget I want the dialog to appear. I do it like:
as global variable define dialog's instance:
then I initialize the instance and show it:
Qt Code:
void mainWindow::showDialog() { dialogWindow=new dialog(this); dialog->show(); }To copy to clipboard, switch view to plain text mode
And it shows. But if I make changes in the dialog's interface (say, put a value in a lineedit that appears in the dialog), and close the dialog, and then call/show it again from the mainWindow, I don't get new dialog instance, but the very same one, with the last values I've put in it. I tried to do setAttribute(Qt::WA_DeleteOnClose); but it doesn't work.
Any idea?
Bookmarks