QGraphicsView doesn't support retina on Mac?



  • Hello!

    I am seeing the antialiasing is still quite grainy using a QGraphicsView on mac. Is it possible to increase the device pixel ratio, or something similar?

    See attached screenshots, expanding to full rez before viewing. Note smoothness of retina button pixmaps at left VS jagged lines in middle.

    I am using a QOpenGLWidget for the viewport:

    view.setViewport(QOpenGLWidget())
    

    I am painting QPainterPaths like this:

    def paint(self, painter, option, widget):
        painter.save()
        painter.setPen(self.pen)
        painter.setBrush(self.brush)
        painter.drawPath(self.path)
        painter.restore()
    

    with the following render hints:

    view.setRenderHints(QPainter.Antialiasing|QPainter.HighQualityAntialiasing|QPainter.SmoothPixmapTransform|QPainter.TextAntialiasing)
    

    and the following attribute set on the QApplication:

    app.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
    

    Thanks!
    -P

    1_1501488629534_2017-07-25_18-28-21.jpg 0_1501488629534_2017-07-25_18-25-52.jpg


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.