diff options
Diffstat (limited to 'examples/dbus/remotecontrolledcar/car/car.cpp')
-rw-r--r-- | examples/dbus/remotecontrolledcar/car/car.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/dbus/remotecontrolledcar/car/car.cpp b/examples/dbus/remotecontrolledcar/car/car.cpp index 4b771c2983..6776784f73 100644 --- a/examples/dbus/remotecontrolledcar/car/car.cpp +++ b/examples/dbus/remotecontrolledcar/car/car.cpp @@ -130,8 +130,8 @@ void Car::timerEvent(QTimerEvent *event) qreal turnRateRads = wheelsAngleRads / turnDistance; // rough estimate qreal turnRate = (turnRateRads * 180) / Pi; qreal rotation = speed * turnRate; - - rotate(rotation); - translate(0, -speed); + + setTransform(QTransform().rotate(rotation), true); + setTransform(QTransform::fromTranslate(0, -speed), true); update(); } |