Hello. The problem is as follows. Created a Qdialog for displaying information. I added the button of maximum expansion to it and in order to launch it the window didn’t open to full screen (if it was closed this way - fully expanded), added the following code before showing the window: "window-> resize (640, 480);"
When you first start it works and the window becomes the right size (and if I just stretch the window, it will also return to the original one), but when you click on the maximum size, close the window and restart, the following happens: 
Elements on the window began to match the size, but the window did not. What to do and how to fix it so that it is possible, if the window was closed at the maximum resolution, did it open again with the original one? The option to "delete the window and create anew" does not offer.
adjustSize (); - the same result.
the result of the error is: "setGeometryDp: Unable to set geometry 640x480 + 519 + 264 on QWidgetWindow / 'briefWindow'. Resulting geometry: 1680x987 + 0 + 23 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0 , 0, minimum size: 93x93, maximum size: 16777215x16777215). SetGeometryDp: Unable to set geometry 640x480 + 0 + 23 on QWidgetWindow / 'briefWindow'. Resulting geometry: 1680x987 + 0 + 23 (frame: 8, 31, 8, 8 , custom margin: 0, 0, 0, 0, minimum size: 93x93, maximum size: 16777215x16777215) "