Hi all :)<br><br>I am trying to draw a cross in a label with coordinates.<br><br>I've think (surely false ;) ) make a a widget, place it on coodinates and paint it with my cross Image.<br><br>here is this code : <br>class point(
QtGui.QWidget):<br> <br> def __init__(self, x, y, parent):<br> print "parti"<br> QtGui.QWidget.__init__(self, parent)<br> self.x = x<br> self.y = y<br> def paintEvent(self, event):
<br> print "parti_"<br> <br> painter = QtGui.QPainter(self)<br> print "painter_ok"<br> painter.setPen(QtCore.Qt.black)<br> painter.drawImage(QtCore.QPoint(self.x
,self.y), QtGui.QImage("croix.png"))<br clear="all"><br><br>I call my widget with : point_draw = point(x,y,self.ui.label_where_to_draw_my_widget)<br><br>When I do this, I could see my paintEvent is launched (print "parti_") but nothings happens on my label.
<br><br>Why ?<br><br>Thanks.<br><br>JB<br><br>-- <br><a href="http://astrolix.org">http://astrolix.org</a><br>association des linuxiens astronomes