Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.11.1
-
None
-
-
1c0f0d3072c0944f95bbc15b7e5d3c1629978a6b
Description
Given the following code :
#include <QApplication> #include <QGraphicsScene> #include <QGraphicsView> #include <QTimer> #include <QGraphicsItem> #include <QGraphicsRectItem> int main(int argc, char *argv[]) { QApplication a(argc, argv); QGraphicsScene scene; QGraphicsView v{&scene}; auto col = QColor::fromHslF(0.2, 0.6, 0.6, 1.); auto it = scene.addRect(QRectF(100, 200, 200, 100), col, col.lighter()); it->setTransformOriginPoint(it->boundingRect().center()); QTimer t; t.setInterval(8); t.connect(&t, &QTimer::timeout, [&] { it->setRotation(it->rotation() + 0.1); }); t.start(); v.showFullScreen(); return a.exec(); }
Behaviour on desktop : the rectangle rotates.
Behaviour on WASM : the rectangle only rotates when the window is resized.
I tried to call v.update(); manually in the timer callback, but this did not change anything.