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

QPainter into QOpenGLPaintDevice differs from QWidget

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.9.1
    • GUI: OpenGL
    • None
    • Windows

      https://doc.qt.io/qt-6/coordsys.html says:

      "When rendering with a one pixel wide pen the pixels will be rendered to the right and below the mathematically defined points."

      So, QPainter::drawRect(0,0,... should result in visible lines. This is the case when using QPainter with a QWidget, but doesn't appear to be when using QOpenGLPaintDevice and QOpenGLWidget.

      When x coordinate is 0, painting in to QOpenGLPaintDevice results in missing left edge as below

          painter.drawRect(0, 0, 99, 99);

      See attached testcase.

       

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

            lagocs Laszlo Agocs
            srcejon Jon Beniston
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes