Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92552

[REG 5.9.3->5.15.2] QWidget::pos() returns wrong position just after restoreGeometry

    XMLWordPrintable

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.)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            wj W. Jaspers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes