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

Repeatedly exec'ing a QDialog causes the dialog to resize/move

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.12.3
    • None
    • I'm using Windows 10, 64 bit
    • Windows

      If a QDialog is repeatedly executed (using QDialog::exec()) the dialog will change size and/or move its position. I've attached a couple screenshots and a minimal example application that illustrates this issue. To duplicate:

      1. Unzip and compile the attached project inside qdialogMoves.zip
      2. Launch application and press the Show Dialog button (screenshot below shows the result the first time the button is pressed)
        1. Observe size and location of initial dialog
        2. Close dialog using the 'X' in the upper right corner
      3. Repeat step #2 multiple times, observing how the dialog changes its size/position. Screenshot below shows after the 21st time:

      At no point am I intentionally resizing the dialog - neither via the mouse nor programmatically using resize() for example.

      I've also attached a video showing the behavior in real time.

        1. 21execs.webm
          918 kB
          Sean Murphy
        2. 21stShowing.png
          10 kB
          Sean Murphy
        3. firstShowing.png
          9 kB
          Sean Murphy
        4. qdialogMoves.zip
          2 kB
          Sean Murphy
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            smurphy Sean Murphy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes