Example #1
0
 def __init__(self, pixmapPath, parent=None):
     super(GraphicsPixmapWidget, self).__init__(parent)
     self.setCacheMode(self.ItemCoordinateCache)
     self._pixmap = QtWidgets.QGraphicsPixmapItem(QtGui.QPixmap(pixmapPath))
     self._pixmapSize = QtCore.QSizeF()
     self.setSizePolicy(QtWidgets.QSizePolicy.Fixed,
                        QtWidgets.QSizePolicy.Fixed)
Example #2
0
 def setPixmap(self, path):
     self.pixmap = QtGui.QPixmap(path)
     self.pixItem = QtWidgets.QGraphicsPixmapItem(self.pixmap, self)
Example #3
0
 def __init__(self, pixmap, parent):
     super(HeaderPixmap, self).__init__(parent)
     self.setPixmap(pixmap)
     self.pixmap = QtGui.QPixmap()
     self.pixItem = QtWidgets.QGraphicsPixmapItem()