QAbstractGraphicsShapeItem露
The
QAbstractGraphicsShapeItemclass provides a common base for all path items. More鈥�

Inherited by: QGraphicsEllipseItem, QGraphicsPathItem, QGraphicsPolygonItem, QGraphicsRectItem, QGraphicsSimpleTextItem
Synopsis露
Functions露
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鈥檚 pen and brush.
- class PySide2.QtWidgets.QAbstractGraphicsShapeItem([parent=None])露
- param parent:
Constructs a
QAbstractGraphicsShapeItem.parentis passed toQGraphicsItem鈥榮 constructor.
- PySide2.QtWidgets.QAbstractGraphicsShapeItem.brush()露
- Return type:
Returns the item鈥檚 brush, or an empty brush if no brush has been set.
See also
- PySide2.QtWidgets.QAbstractGraphicsShapeItem.pen()露
- Return type:
Returns the item鈥檚 pen. If no pen has been set, this function returns QPen(), a default black solid line pen with 1 width.
See also
- PySide2.QtWidgets.QAbstractGraphicsShapeItem.setBrush(brush)露
- Parameters:
brush 鈥�
PySide2.QtGui.QBrush
Sets the item鈥檚 brush to
brush.The item鈥檚 brush is used to fill the item.
If you use a brush with a
QGradient, the gradient is relative to the item鈥檚 coordinate system.See also
- PySide2.QtWidgets.QAbstractGraphicsShapeItem.setPen(pen)露
- Parameters:
pen 鈥�
PySide2.QtGui.QPen
Sets the pen for this item to
pen.The pen is used to draw the item鈥檚 outline.
See also
漏 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.