How to preserve QDialog widget size after hide/show
-
I have custom QDialog subclass which I want won't change its geometry and position after each hide + show call. Currently the position is preserved but the size is reset to its initial size, despite user previously resized it. I know it can be done using getting current geometry and then restoring it by setGeometry, but is it possible to set some flag in order to do it automatically?
-
@RedSoft
There is no magic flag if you say it's not being preserved. (I thought it would remember both, but if you say it restores position but not size fair enough.) UsesetGeometry()
or similar to restore if you find you need to. -
@RedSoft said in How to preserve QDialog widget size after hide/show:
but the size is reset to its initial size, despite user previously resized it.
And you're sure you don't have a resize() somewhere? Please check with an empty class derived from QDialog - the size will not change for sure.
2/3