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

Calling hide(), then show() on a QDialog doesn't correctly preserve its geometry

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.0, 6.8
    • None
    • Linux/X11, macOS, Windows

    Description

      In Qt5, creating a dialog, then calling hide() and later show() on it would restore it in the same location with the same size.

      In Qt6, this behaviour seems broken. On Linux/X11, I get different kinds of broken behaviours, ranging from a correctly sized window with rendering issues to the size just being reset (seems to be random). On Windows, size seems to always be forgotten.

      The attached example reproduces the problem; move and resize the dialog, then press the button. I would expect the dialog to briefly disappear, then reappear with the same size in the same place but that's not what happens.

      Attachments

        Issue Links

          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
              scummo Sven Brauch
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes