I am adding Apple Retina Display support to the PyQt5 application. Although I successfully deleted high-resolution images (adding the @ 2x suffix to all my .png files and installing Qt.AA_UseHighDpiPixmaps in my QApplication ), I am having some problems rendering high-resolution QGraphicsItem in QGraphicsScene + QGraphicsView .
In my application, in addition to loading .png files, I also create several QPixmap my self (embedding them in Icon ) to create a character palette that the user can use to add new shapes to the diagram displayed in QGraphicsView , QGraphicsView .:
def icon(cls, width, height, **kwargs): """ Returns an icon of this item suitable for the palette. :type width: int :type height: int :rtype: QIcon """ icon = QIcon() for i in (1.0, 2.0):
Create one of the symbols of my palette (diamond).

However, when I add items to my QGraphicsScene displayed in the QGraphicsView , they are displayed in low resolution:
def paint(self, painter, option, widget=None): """ Paint the node in the diagram. :type painter: QPainter :type option: QStyleOptionGraphicsItem :type widget: QWidget """ painter.setPen(self.pen) painter.setBrush(self.brush) painter.drawPolygon(self.polygon)

The text inside the form is displayed correctly, and I do not draw it myself, since it QGraphicsTextItem has my QGraphicsItem as the parent.
The problem is that while for QPixmap I can set the pixel ratio of the device, for QGraphicsItem I can not. Did I miss something?
I use PyQt 5.5.1, built against Qt 5.5.1 and SIP 4.18 (I do not use 5.6, since I experience several crashes when starting the application, which I already reported to PyQt developers).