okok, je vois mieux, mais je dois avoir une mauvaise vision car je le trouve pas ce :evil: :evil: :evil: :evil: :evil: de carré.
#==================================
# Constructor
#==================================
class DrawGraph(QtGui.QFrame):
def __init__(self, parent=None):
QtGui.QFrame.__init__(self, parent)
self.move(0, 0)
self.setMinimumSize(800, 600)
self.setFrameStyle(QtGui.QFrame.Sunken | QtGui.QFrame.StyledPanel)
self.setWindowTitle(self.tr("Test AFPy Objets Graphique"))
def dessine_moi_le_carre_stp(self):
self.QPath = QtGui.QPainterPath()
self.qpm = QtGui.QPixmap(800,600)
self.QPainter = QtGui.QPainter(self.qpm)
self.QPath.addRect(10,10,10,10)
self.QPainter.fillPath(self.QPath, QtGui.QBrush(QtCore.Qt.black))
self.QPainter.drawPath(self.QPath)
self.QPainter.end()
self.newQP = QtGui.QPainter(self)
self.newQP.drawPixmap(QtCore.QPointF(0,0), self.qpm)
self.newQP.end()
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
window = DrawGraph()
window.show()
window.dessine_moi_le_carre_stp()
sys.exit(app.exec_())
:evil: :evil: :oops: :roll: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil:
okok, je vois mieux, mais je dois avoir une mauvaise vision car je le trouve pas ce :evil: :evil: :evil: :evil: :evil: de carré.
:evil: :evil: :oops: :roll: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: