解决小车旋转中心问题

This commit is contained in:
TurnMeOn committed 2017-12-19 18:54:54 +08:00
1 parent e56597c1b5
commit 202b75d324
1 file changed
+1
+1
View File
@@ -24,6 +24,7 @@ Cars::Cars(QGraphicsItem *parent, int dir, Cars::Color color) : QGraphicsPixmapI
}
m_pic = m_pic.scaled(M_WID, M_LEN);
this->setPixmap(m_pic);
setTransformOriginPoint(M_WID/2, M_LEN/2); //设置旋转中心
}
void Cars::Forward(int vel)