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

QWidget.move() is not idempotent (Qt.AA_EnableHighDpiScaling)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Out of scope
    • Affects Version/s: 5.12.3
    • Fix Version/s: None
    • Component/s: Widgets: Layout
    • Labels:
    • Platform/s:
      Windows

      Description

      When QWidget.move() is called repeatedly with the same coordinates, it should stay in the same spot. In certain situations, doing this causes the widget to bounce back and forth between screens.
       
      Repro setup
      Two monitors, both set to 200% scaling, so that they are side-by-side. Enable high-DPI scaling by setting the Qt.AA_EnableHighDpiScaling flag.
       
      1) Run app. With window entirely on left screen, press the button more than once. Note that the position of the small popup widget does not change after the first press.
      Expected: popup stays on upper left corner of window.
      Actual == expected
       
      2) Now place window entirely on right screen, and repeat.
      Expected: popup stays on upper left corner of window.
      Actual == expected
       
      3) Now place window roughly in the middle, but mostly on the RHS. You will be able to tell if you are in the right spot because the window geometry's left will be out of screen 0's geometry range, e.g. 3654. Try putting the "D" in "Dump" in the middle of the screen (so it is on both screens). Now click the button multiple times.
      Expected: popup stays on upper left corner of window.
      Actual: popup goes back and forth between its proper position and the same relative position on the other screen

        Attachments

        1. QtScreens.py
          4 kB
        2. QtScreens.py
          4 kB
        3. qtbug77470.py
          4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            drelyea David Relyea
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes