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

REG 5.9.x->5.12: Windows: Menus have wrong size when AA_EnableHighDpiScaling is set

    XMLWordPrintable

Details

    • 9ad0e09f5bbaab8ced2ea6bb175bbd13935413cf

    Description

      1. Have a primary UHD-screen scaled to 200% and a secondary FullHD-screen scaled to 100%.
      2. Open the Main Window example.
        It's in Examples\Qt-5.9\widgets\mainwindows\mainwindow\mainwindow.pro
      3. At the very beginning of main.cpp the main function, add the line:
        QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
        
      4. Build and run the example.
      5. Move the example's window to the secondary screen.
      6. Right-click into one of the dock windows.
        The appearing context menu is far too small:
      7. Right-click into the same dock window again.
        Now the context menu has the right size.
      8. Move the example's window to the primary screen.
      9. Right-click into one of the dock windows.
        The appearing context menu is far too big:
      10. Right-click into the same dock window again.
        Now the context menu has the right size.

      The context menus should always have the right size. With Qt 5.8 this used to work correctly.

      Attachments

        1. truncatedmenu.py
          1 kB
        2. truncatedmenu.py
          1 kB
        3. tooSmall.png
          tooSmall.png
          3 kB
        4. tooBig.png
          tooBig.png
          32 kB
        5. second-click.png
          second-click.png
          43 kB
        6. screenshot-1.png
          screenshot-1.png
          24 kB
        7. qtdiag2.txt
          6 kB
        8. qtdiag.txt
          7 kB
        9. qtbug59794.zip
          2 kB
        10. qtbug59794_diag.diff
          0.4 kB
        11. first-click.png
          first-click.png
          51 kB

        Issue Links

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

          Activity

            People

              tmartsum Thorbjørn Lund Martsum
              rlohning Robert Löhning
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes