def paintEvent(self, paintEvent):
painter = QPainter(self)
painter.translate(self.width()/2, self.height()/2)
painter.rotate(45)
painter.translate(-self.width()/2, -self.height()/2) -sharp
as shown in the figure and code, according to my understanding,
- translate width/2
- rotate 45
- Pan-width/2
the result should be green, but it is actually red
how should I explain it?