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

QMenu appears at the wrong position without Per-Monitor DPI awareness

    XMLWordPrintable

    Details

    • Platform/s:
      Windows

      Description

      Steps to reproduce

      1. Set up 2 (or more) monitors, with different scalings each (e.g. 125% and 200%)
      2. Build and run the attached application with the command-line arg, "-platform windows:dpiawareness=0" or "-platform windows:dpiawareness=1"
      3. Undock the dock widget
      4. Keep the main widget on the 1st screen but move the undocked widget to the 2nd screen
      5. Click on the "Files" menu

       

      Result

      The drop-down menu shows up in wrong position and with the wrong scaling (see attached screenshot).

      It might even appear off-screen if the 2nd screen has a higher scaling than the 1st.

      Use-case for these settings

      A customer is in the middle of migrating an MFC app to Qt; they cannot enable Per-Monitor DPI awareness while in hybrid MFC + Qt mode.

        Attachments

        1. broken_menu_example.zip
          2 kB
        2. menu-offset.png
          menu-offset.png
          1.86 MB
        3. qtbug102982.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:
              skoh-qt Sze Howe Koh
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes