From 202b75d324db0d9bf944edb8d455392769aa5eaa Mon Sep 17 00:00:00 2001 From: TurnMeOn Date: Tue, 19 Dec 2017 18:54:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=B0=8F=E8=BD=A6=E6=97=8B?= =?UTF-8?q?=E8=BD=AC=E4=B8=AD=E5=BF=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cars.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cars.cpp b/cars.cpp index bf93cdb..acc545a 100644 --- a/cars.cpp +++ b/cars.cpp @@ -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)