The PySide.QtGui.QGraphicsPathItem class provides a path item that you can add to a PySide.QtGui.QGraphicsScene .
To set the item’s path, pass a PySide.QtGui.QPainterPath to PySide.QtGui.QGraphicsPathItem ‘s constructor, or call the PySide.QtGui.QGraphicsPathItem.setPath() function. The PySide.QtGui.QGraphicsPathItem.path() function returns the current path.
PySide.QtGui.QGraphicsPathItem uses the path to provide a reasonable implementation of PySide.QtGui.QGraphicsPathItem.boundingRect() , PySide.QtGui.QGraphicsPathItem.shape() , and PySide.QtGui.QGraphicsPathItem.contains() . The PySide.QtGui.QGraphicsPathItem.paint() function draws the path using the item’s associated pen and brush, which you can set by calling the PySide.QtGui.QAbstractGraphicsShapeItem.setPen() and PySide.QtGui.QAbstractGraphicsShapeItem.setBrush() functions.
Parameters: |
|
---|
Return type: | PySide.QtGui.QPainterPath |
---|
Returns the item’s path as a PySide.QtGui.QPainterPath . If no item has been set, an empty PySide.QtGui.QPainterPath is returned.
Parameters: | path – PySide.QtGui.QPainterPath |
---|
Sets the item’s path to be the given path .