• PySide 模块
  • PySide.QtGui
  • 内容表

    上一话题

    QGraphicsLineItem

    下一话题

    QGraphicsPolygonItem

    QAbstractGraphicsShapeItem

    继承者: QGraphicsPolygonItem , QGraphicsEllipseItem , QGraphicsRectItem , QGraphicsPathItem , QGraphicsSimpleTextItem

    概要

    函数

    详细描述

    PySide.QtGui.QAbstractGraphicsShapeItem class provides a common base for all path items.

    This class does not fully implement an item by itself; in particular, it does not implement PySide.QtGui.QGraphicsItem.boundingRect() and PySide.QtGui.QGraphicsItem.paint() , which are inherited by PySide.QtGui.QGraphicsItem .

    You can subclass this item to provide a simple base implementation of accessors for the item's pen and brush.

    class PySide.QtGui. QAbstractGraphicsShapeItem ( [ parent=None [ , scene=None ] ] )
    参数:
    PySide.QtGui.QAbstractGraphicsShapeItem. brush ( )
    返回类型: PySide.QtGui.QBrush

    Returns the item's brush, or an empty brush if no brush has been set.

    PySide.QtGui.QAbstractGraphicsShapeItem. pen ( )
    返回类型: PySide.QtGui.QPen

    Returns the item's pen. If no pen has been set, this function returns QPen(), a default black solid line pen with 0 width.

    PySide.QtGui.QAbstractGraphicsShapeItem. setBrush ( brush )
    参数: brush PySide.QtGui.QBrush

    把项笔刷设为 brush .

    The item's brush is used to fill the item.

    If you use a brush with a PySide.QtGui.QGradient , the gradient is relative to the item's coordinate system.

    PySide.QtGui.QAbstractGraphicsShapeItem. setPen ( pen )
    参数: pen PySide.QtGui.QPen

    Sets the pen for this item to pen .

    The pen is used to draw the item's outline.