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

Tooltips dialogues show up in the wrong place with Windows fractional scaling.

    XMLWordPrintable

Details

    • Windows

    Description

      User reported that with fractional scaling the tooltip appears in wrong location.

      Example attached.

      To recreate this problem, set Windows scaling to 125% and open the program in full screen, hover your cursor over the button on the far right hand side and you'll see the tool tip is in the wrong place

      Tested with 3840x2160 (125% scaling):

      Qt:5.15.12 Correct position

      Qt:6.4.2 Wrong position

      Qt:6.2.7 Wrong position

      "
      The problem seems to center around the following line of code:

      "QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor);"

      When this is removed all the images in the program become jagged like the anti-aliasing is off.

      But with this line of code, issues begin to crop up in our program when fractional scaling is being used in Windows.

      it forms an invisible rectangle from which these menu tooltips or other items seem to be constrained

      It seems like this invisible rectangle might be the size of the device independent pixels of the UI but I'm not sure.

      So the line can't be removed without ruining the look of the ui, but leaving it in place causes odd glitches with placement of tool tips
      "

      Attachments

        1. tooltips4.7z
          140 kB
        2. error schreen shot.png
          error schreen shot.png
          91 kB

        Activity

          People

            hehalmet Heikki Halmet
            tero.pelkonen Tero Pelkonen
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: