示例#1
0
 def paint(self, painter, option, widget=None):
     painter_inverted = QPainter()
     brect= QGraphicsProxyWidget.boundingRect(self)
     invertedColor = QImage(brect.width(),brect.height(),QImage.Format_RGB32)
     painter_inverted.begin(invertedColor)
     QGraphicsProxyWidget.paint(self,painter_inverted, option, widget)
     painter_inverted.end()
     painter.drawImage(0,0,invertedColor.rgbSwapped())
示例#2
0
 def boundingRect(self):
     return QGraphicsProxyWidget.boundingRect(self).adjusted(0, 0, 0, 0);