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

Complicated to e.g center a widget on a screen (add align func?) - REGRESSION

    XMLWordPrintable

Details

    • Windows

    Description

      With Qt 6.2.4 the handling handling of more monitors with different resolutions / dpi a lot (since 5.15.x). However, despite being much more solid, the new system also has made other things more complicated. If I have observed correctly, the screen reports its size in screen-pixels which are different from the 'pixel'-units especially widget position uses.

      Showing a window in the center of the screen certainly gets somewhat more complicated. To be honest I don't even know how to center a widget on a screen.

      I have bumped into this issue again. I actually wonder how the various screen functions have any meaning at all when the size is sometimes is returned in Qt units and sometimes in pixel units. If I have a 24" 4K display on Windows it will return the (available) size 3840x2100 if it is parried with an old-style dpr1 monitor, but 2560x1400 if it is alone or matched with another 24" 4K display.

      How can I use this size for anything if I don't know what unit it is in? (The documentation writes pixels, but the definition of pixels depends on the hardware setup).
      Some API to normalize this size would certainly be very welcome.

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            tmartsum Thorbjørn Lund Martsum
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes