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

Dockwidgets on multiple screens + dpiawareness 1,0 breaks QMenu positions

    XMLWordPrintable

    Details

    • Platform/s:
      Windows

      Description

      Adding a qt.conf with dpiawareness=1 changes the behavior of QMenu when a dockwidget is moved to a different screen.

      Expected behavior:

      QMenu should be below the toolbar at all times. Please see the image expected.png

      Actual behavior:

      QMenu is entirely detached from the toolbar and outside the MainWindow, positioned towards the upper right or left corner of the screen. Please see the image actual.png.

      Steps to reproduce the issue:

      1. Build the Dock Widgets example
      2. Add qt.conf with dpiawareness=1 (See attachment: qt.conf)
      3. Run Dock Widgets example
      4. Move either of the dock widgets to a different screen
      5. Click on any QToolbar

      Observations:

      The actual position of the QMenu seems to remain relative to the MainWindow. The QMenu may appear on the upper right or left corner of the screen and this seems to be dependent on whether a dockwidget was moved to a screen on left or right respectively.

      The QMenus returns to normal after the dockwidget is moved back to the same screen and the MainWindow is moved a bit.

      Additionally, the buttons on the drop down can be clicked on both their expected position (right under the toolbar) and where the QMenu is actually displayed.

      This bug has been reproduced with:

      • 3 screen setup: 2560 x 1440 (200%), 3840 x 2160 (200%), 1600 x 1200 (100%)
      • 2 screen setup: 2560 x 1600 (100%) and 2160 x 3840 (150%).

        Attachments

        1. actual.png
          actual.png
          135 kB
        2. expected.png
          expected.png
          71 kB
        3. qt.conf
          0.0 kB
        4. qtbug73131_diag.diff
          5 kB
        5. qtbug73131_log.txt
          28 kB
        6. qtbug73131_screens.txt
          2 kB
        7. qtbug73131.zip
          4 kB

          Issue Links

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

            Activity

              People

              • Assignee:
                kleint Friedemann Kleint
                Reporter:
                miikapernu Miika Pernu
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes