Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Correct boundingRect() for items ignoring transformations?



  • Qt docs on QGraphicsItem::boundingRect() state:
    "all painting must be restricted to inside an item's bounding rect"

    How do I do that when the item has the ItemIgnoresTransformations flag set?

    The boundingRect is given in item coordinates. The requires paint area for an item ignoring transformations will depend on the zoom level, and might be different for every view connected to the scene.


Log in to reply