Le 23/10/10 09:09, leo kirotawa a écrit :
Hi,Hi, I have reproduce your code like this: class GraphicView(object): def __init__(self, MainWindow): MainWindow.resize(864, 649) self.centralwidget = QtGui.QWidget(MainWindow) self.gridLayout = QtGui.QGridLayout(self.centralwidget) self.scene = QtGui.QGraphicsScene(self.centralwidget) self.graphicsView = QtGui.QGraphicsView(self.scene) self.graphicsView.setRenderHints(QtGui.QPainter.Antialiasing) pixmap = QtGui.QImage("amymc1.jpg") self.graphicsView.setBackgroundBrush(QtGui.QBrush(pixmap)) self.graphicsView.setCacheMode(QtGui.QGraphicsView.CacheBackground) self.gridLayout.addWidget(self.graphicsView, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) On Qt 4.6, PyQt 4.7.2 and Qt 4.7, PyQt 4.7.4 That functions but the result is unexpected.(See attachement) |
<<attachment: background.jpg>>
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
