- class QAbstractGraphicsShapeItem¶
The
QAbstractGraphicsShapeItem
class provides a common base for all path items. More…Inherited by:
QGraphicsSimpleTextItem
,QGraphicsRectItem
,QGraphicsPolygonItem
,QGraphicsPathItem
,QGraphicsEllipseItem
Synopsis¶
Methods¶
def
__init__()
def
brush()
def
pen()
def
setBrush()
def
setPen()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
This class does not fully implement an item by itself; in particular, it does not implement
boundingRect()
andpaint()
, which are inherited byQGraphicsItem
.You can subclass this item to provide a simple base implementation of accessors for the item’s pen and brush.
- __init__([parent=None])¶
- Parameters:
parent –
QGraphicsItem
Constructs a
QAbstractGraphicsShapeItem
.parent
is passed toQGraphicsItem
‘s constructor.Returns the item’s brush, or an empty brush if no brush has been set.
See also
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
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
Sets the pen for this item to
pen
.The pen is used to draw the item’s outline.
See also