Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.8.2
-
None
Description
I have a QGraphicsScene, to which I connect my own view, that is not derived from a QWidget. Generally, everything works. However, my view never receives the signals changed or sceneRectChanged.
Specifically, my QGraphicsObject calls update() when it needs a repaint. But this does not lead to the signals changed or sceneRectChanged being emitted.
I have the following simple code, that I think should trigger when update() is called:
QObject::connect(mQGraphicsScene, &QGraphicsScene::changed, [](const QList<QRectF>& region) { MyMessage(6, "QGraphicsScene::changed signal received.\n"); }); QObject::connect(mQGraphicsScene, &QGraphicsScene::sceneRectChanged, [](const QRectF& rect) { MyMessage(6, "QGraphicsScene::sceneRectChanged signal received.\n"); });
The code in the lambdas is never called - I checked with the debugger and also for the printed message.