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

QGLWindow::renderText(x,y,z,...) draws text at the wrong coordinates with hidpi displays

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.5.0 Beta
    • 5.2.1, 5.3.0 Beta1
    • GUI: OpenGL
    • None
    • 5c379f3ff0471c51827577d047c93bab88ad44ce

    Description

      The renderText(x,y,z,...) function doesn't account for the devicePixelRatio of a window. Thus when drawing text on a HiDPI-window the coordinates are wrong.

      The attached example should draw the text directly above the drawn line. However on HiDPI the text is a bit off.

      Attachments

        1. glwidget.zip
          2 kB
          Michael Eischer
        2. opengl-hidpi.png
          16 kB
          Michael Eischer
        3. opengl-standard.png
          10 kB
          Michael Eischer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            michael.eischer Michael Eischer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes