Hello all, I want to show a graph (png file) about network traffic usage in my pyQt application. The following works, but I want to put the picture in the main window.
image = Image.open ('ragraph.png')
image.show()
A simple question I guess, but as a newbie - I couldn't suceed.
I put a graphicsView object but I couldn't write to it.
self.image = QtGui.QImage()
self.image.load(QtCore.QString("ragraph.png"))
self.image=self.image.scaledToWidth(self.image.width()/2)
#self.image=self.image.scaled (QSize(321, 271) )
scene = QtGui.QGraphicsScene()
self.item = self.image
scene.addItem(self.item)
scene.setSceneRect(-600, -600, 1200, 1200)
self.graphicsView.show();
I couldn't additem to the QGraphicsScene object
I suppose I am in a wrong direction. Any recommendations will be appreciated.
Thanks,
--
--------------------------------------------
* Ar.Gör.Enis Karaarslan
*
* ULAK-CSIRT - http://csirt.ulakbim.gov.tr
--------------------------------------------
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
