Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsView doesn't support retina on Mac?
Forum Updated to NodeBB v4.3 + New Features

QGraphicsView doesn't support retina on Mac?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 388 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    patrickkidd
    wrote on last edited by patrickkidd
    #1

    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

    https://alaskafamilysystems.com/

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved