Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.15.2
-
None
Description
QDialog/QWidget::pos() returns wrong position just after restoreGeometry, when restoreGeometry is called just after dialog creation.
Position is 32 pixels too low, 1 too far the right.
So it seems position of contentarea is returned.
(Note that restoreGeometry does restore the dialog to the correct position.)
When "dialog.move(dialog.pos());" is called right after restoreGeometry, dialog is moved 32 pixels lower and 1 pixel to the right.
Calling that line again few times, does not alter position more.
So after call to move the pos() does return correct position.
In 5.9.3 pos() returned right y-position, but x position was 7 too far to left, but calling "dialog.move(dialog.pos());" did not change its position, so that did not cause problem for us.
In 5.15.2 however pos() does return the right position when called just after showEvent.
(If this would be expected behaviour, then the documentation should explain this.)