Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Is there similar function QGraphicsItem::boundingRect () for circle?
romeo.rbw last edited by
I used the boundingRect() to make a circle. But the active region always a rectangular like in the manual instruction. Is there any suggestion, how to make my active region only in the inside of the circle especially when pointing a cursor to this item? Thank you.
would be "QGraphicsItem::shape()":http://qt-project.org/doc/qt-4.8/qgraphicsitem.html#shape enough for you?
Asperamanca last edited by
If you use QGraphicsEllipseItem, the shape should already be correctly defined for you.
If you write your own QGraphicsItem subclasses, you can optionally reimplement shape() in order to give the item any shape you like. By default, the shape is equal to the boundingRect.
See "the docs":http://qt-project.org/doc/qt-4.8/qgraphicsitem.html#shape for more info about what the shape is used for.