it there any way to not delete the child widget inside a QDialog while close the dialog?
-
it there any way to not delete the child widget inside a QDialog while close the dialog?
i reuse a QWidget, and use setWidget() to set this widget into a QDialog.. then i call dialog.exec(), when i click cancel or close button of the dialog, the QWidget's deconstructor will also be called..but i donot want to delete the QWidget....
is there any way to do this? -
When a parent is destroyed the childs are automatically destroyed too. If you want to keep your widget don't destroy your dialog.. but I really don't understand why you would want to do this.. instead of destroying your dialog call hide() on it or something by catching the signals... you should just create a new one for your other use..