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

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

    XMLWordPrintable

Details

    • 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. qtbug102982.zip
          4 kB
        2. menu-offset.png
          menu-offset.png
          1.86 MB
        3. broken_menu_example.zip
          2 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-102982
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              skoh-qt Sze Howe Koh
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes