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. first-click.png
          51 kB
          Marko Luther
        2. qtbug59794_diag.diff
          0.4 kB
          Friedemann Kleint
        3. qtbug59794.zip
          2 kB
          Friedemann Kleint
        4. qtdiag.txt
          7 kB
          Robert Löhning
        5. qtdiag2.txt
          6 kB
          Thorbjørn Lund Martsum
        6. screenshot-1.png
          24 kB
          Carter Davies
        7. second-click.png
          43 kB
          Marko Luther
        8. tooBig.png
          32 kB
          Robert Löhning
        9. tooSmall.png
          3 kB
          Robert Löhning
        10. truncatedmenu.py
          1 kB
          Marko Luther
        11. truncatedmenu.py
          1 kB
          Marko Luther

        Issue Links

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

          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