Qt close a running window through code
39,936
Solution 1
this->close();
or
close();
Ref: http://doc.qt.digia.com/4.7/qwidget.html#close
Solution 2
MyWidget *newform = new MyWidget;
newform->show();
this->hide();
Author by
tyty5949
Updated on July 30, 2022Comments
-
tyty5949 almost 2 years
I have a program that opens another window and i want the old window to close. Is there some function or something that would close the window through the code but keep the other window running?