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

    • 9ad0e09f5bbaab8ced2ea6bb175bbd13935413cf

      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.

        1. first-click.png
          first-click.png
          51 kB
        2. qtbug59794_diag.diff
          0.4 kB
        3. qtbug59794.zip
          2 kB
        4. qtdiag.txt
          7 kB
        5. qtdiag2.txt
          6 kB
        6. screenshot-1.png
          screenshot-1.png
          24 kB
        7. second-click.png
          second-click.png
          43 kB
        8. tooBig.png
          tooBig.png
          32 kB
        9. tooSmall.png
          tooSmall.png
          3 kB
        10. truncatedmenu.py
          1 kB
        11. truncatedmenu.py
          1 kB
        For Gerrit Dashboard: QTBUG-59794
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes