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

Drop-down menu is displayed at a wrong position in a wrong size

    XMLWordPrintable

Details

    • Windows

    Description

      Issue:
      A drop down menu can be displayed at a wrong position in a wrong size under follwing condisions :

      • Use Qt 5.15.15 , Qt 5.15.16, Qt 5.15.17, Qt 6.6.2 or Qt 6.6.3
      • An application has a main window and a sub window
      • Prepare two monitors with diffrent DPIs and scaling settings, for instance : 
            Main monitor :  resolution = 2560x1600, scaling = 200%
            Secondary monitor : resolution = 1920x1080, scaling = 100%
      •  Use "Extend these diplays" setting in display setting, and place the main window on the right, and the secondary monitor on the left, side-by-side.
      • Set DPI awareness to "System" by setting in qt.conf as follows :
            [Platforms]
            WindowsArguments = dpiawareness=1

      Steps to reproduce the issue:

      • Run the attached reproducer with "#define SUBWINDOW_ON_2ND_DISP (1)"
      • On the main window (titled "DPI-popup"), click "Test" on the menu bar, then a drop-down menu will be displayed in a smaller size.
      • Move the main window a bit by dragging, then click "Test" again,  then a drop-down meny will be displayed at a wrong position.

      Side note:

      • The issue is not reproducible with Qt 6.7.1.  This issue can be reproduced with Qt 6.7.1 under an additional condition. (A comment will be added for details)
      • This issue looks similar to QTBUG-102982, but I created this ticket because it is reproducible on a different OS (windows 11) and Qt versions.

       

      Attachments

        1. button_map_to_global.zip
          1 kB
          Morten Sørvig
        2. DPI-Popup_2.zip
          2 kB
          Hitoshi Ito
        3. DPI-Popup.zip
          2 kB
          Hitoshi Ito
        4. image-2024-06-21-12-29-59-804.png
          43 kB
          Morten Sørvig
        5. NG_qt6_6_3_subwindow_on_2ndDisp.png
          1.31 MB
          Hitoshi Ito
        6. NG_qt6_7_1_subwindow_on_2ndDisp.png
          1.31 MB
          Hitoshi Ito
        7. OK_qt6_6_3_subwindow_on_1stDisp.png
          1.07 MB
          Hitoshi Ito
        8. OK_qt6_7_1_subwindow_on_1stDisp.png
          1018 kB
          Hitoshi Ito
        9. OK_qt6_7_1_subwindow_on_2ndDisp.png
          1.26 MB
          Hitoshi Ito

        Issue Links

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

          Activity

            People

              sorvig Morten Sørvig
              hitoshiito Hitoshi Ito
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes