QAbstractGraphicsShapeItem Class▲
- 
					Header: QAbstractGraphicsShapeItem 
- 
					CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) 
- 
					qmake: QT += widgets 
- 
					Inherits: QGraphicsItem 
- 
					Inherited By: QGraphicsEllipseItem, QGraphicsPathItem, QGraphicsPolygonItem, QGraphicsRectItem, and QGraphicsSimpleTextItem 
- 
					Group: QAbstractGraphicsShapeItem is part of graphicsview-api 
Detailed Description▲
This class does not fully implement an item by itself; in particular, it does not implement boundingRect() and paint(), which are inherited by QGraphicsItem.
You can subclass this item to provide a simple base implementation of accessors for the item's pen and brush.
See Also▲
Member Function Documentation▲
[explicit] QAbstractGraphicsShapeItem::QAbstractGraphicsShapeItem(QGraphicsItem *parent = nullptr)▲
Constructs a QAbstractGraphicsShapeItem. parent is passed to QGraphicsItem's constructor.
[virtual] QAbstractGraphicsShapeItem::~QAbstractGraphicsShapeItem()▲
Destroys a QAbstractGraphicsShapeItem.
QBrush QAbstractGraphicsShapeItem::brush() const▲
[override virtual] bool QAbstractGraphicsShapeItem::isObscuredBy(const QGraphicsItem *item) const▲
Reimplements: QGraphicsItem::isObscuredBy(const QGraphicsItem *item) const.
[override virtual] QPainterPath QAbstractGraphicsShapeItem::opaqueArea() const▲
Reimplements: QGraphicsItem::opaqueArea() const.
QPen QAbstractGraphicsShapeItem::pen() const▲
Returns the item's pen. If no pen has been set, this function returns QPen(), a default black solid line pen with 1 width.
See Also▲
See also setPen()
void QAbstractGraphicsShapeItem::setBrush(const QBrush &brush)▲
Sets the item's brush to brush.
The item's brush is used to fill the item.
If you use a brush with a QGradient, the gradient is relative to the item's coordinate system.
See Also▲
See also brush()




