Skip to content

PythonQt.QtGui.QGraphicsItem · declarations 004

Back to PythonQt.QtGui.QGraphicsItem

setFlag

setFlag(arg0: flag, enabled: bool) -> None

X.setFlag(flag, enabled)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setFlag(QGraphicsItem::GraphicsItemFlag flag, bool enabled \= true)

If enabled is true, the item flag flag is enabled; otherwise, it is disabled.

See also flags() and setFlags().

Upstream PySide2 reference signatures (binding differences may apply):

setFlag(self, flag: PySide2.QtWidgets.QGraphicsItem.GraphicsItemFlag, enabled: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setFlag

setFlags

setFlags(arg0: flags) -> None

X.setFlags(flags)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setFlags(QGraphicsItem::GraphicsItemFlags flags)

Sets the item flags to flags. All flags in flags are enabled; all flags not in flags are disabled.

If the item had focus and flags does not enable ItemIsFocusable, the item loses focus as a result of calling this function. Similarly, if the item was selected, and flags does not enabled ItemIsSelectable, the item is automatically unselected.

By default, no flags are enabled. (QGraphicsWidget enables the ItemSendsGeometryChanges flag by default in order to track position changes.)

See also flags() and setFlag().

Upstream PySide2 reference signatures (binding differences may apply):

setFlags(self, flags: PySide2.QtWidgets.QGraphicsItem.GraphicsItemFlags) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setFlags

setFocus

setFocus(focusReason: Any) -> None

X.setFocus(focusReason)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setFocus(Qt::FocusReason focusReason \= Qt::OtherFocusReason)

Gives keyboard input focus to this item. The focusReason argument will be passed into any focus event generated by this function; it is used to give an explanation of what caused the item to get focus.

Only enabled items that set the ItemIsFocusable flag can accept keyboard focus.

If this item is not visible, not active, or not associated with a scene, it will not gain immediate input focus. However, it will be registered as the preferred focus item for its subtree of items, should it later become visible.

As a result of calling this function, this item will receive a focus in event with focusReason. If another item already has focus, that item will first receive a focus out event indicating that it has lost input focus.

See also clearFocus(), hasFocus(), focusItem(), and focusProxy().

Upstream PySide2 reference signatures (binding differences may apply):

setFocus(self, focusReason: PySide2.QtCore.Qt.FocusReason=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setFocus

setFocusProxy

setFocusProxy(item: Any) -> None

X.setFocusProxy(item)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setFocusProxy(QGraphicsItem *item)

Sets the item's focus proxy to item.

If an item has a focus proxy, the focus proxy will receive input focus when the item gains input focus. The item itself will still have focus (i.e., hasFocus() will return true), but only the focus proxy will receive the keyboard input.

A focus proxy can itself have a focus proxy, and so on. In such case, keyboard input will be handled by the outermost focus proxy.

The focus proxy item must belong to the same scene as this item.

This function was introduced in Qt 4.6.

See also focusProxy(), setFocus(), and hasFocus().

Upstream PySide2 reference signatures (binding differences may apply):

setFocusProxy(self, item: PySide2.QtWidgets.QGraphicsItem) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setFocusProxy

setGraphicsEffect

setGraphicsEffect(effect: Any) -> None

X.setGraphicsEffect(effect)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setGraphicsEffect(QGraphicsEffect *effect)

Sets effect as the item's effect. If there already is an effect installed on this item, QGraphicsItem will delete the existing effect before installing the new effect. You can delete an existing effect by calling setGraphicsEffect(nullptr).

If effect is the installed effect on a different item, setGraphicsEffect() will remove the effect from the item and install it on this item.

QGraphicsItem takes ownership of effect.

Note: This function will apply the effect on itself and all its children.

This function was introduced in Qt 4.6.

See also graphicsEffect().

Upstream PySide2 reference signatures (binding differences may apply):

setGraphicsEffect(self, effect: PySide2.QtWidgets.QGraphicsEffect) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setGraphicsEffect

setGroup

setGroup(group: Any) -> None

X.setGroup(group)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setGroup(QGraphicsItemGroup *group)

Adds this item to the item group group. If group is nullptr, this item is removed from any current group and added as a child of the previous group's parent.

See also group() and QGraphicsScene::createItemGroup().

Upstream PySide2 reference signatures (binding differences may apply):

setGroup(self, group: PySide2.QtWidgets.QGraphicsItemGroup) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setGroup

setHandlesChildEvents

setHandlesChildEvents(enabled: bool) -> None

X.setHandlesChildEvents(enabled)

Upstream PySide2 reference signatures (binding differences may apply):

setHandlesChildEvents(self, enabled: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setHandlesChildEvents

setInputMethodHints

setInputMethodHints(hints: Any) -> None

X.setInputMethodHints(hints)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setInputMethodHints(Qt::InputMethodHints hints)

Sets the current input method hints of this item to hints.

This function was introduced in Qt 4.6.

See also inputMethodHints() and inputMethodQuery().

Upstream PySide2 reference signatures (binding differences may apply):

setInputMethodHints(self, hints: PySide2.QtCore.Qt.InputMethodHints) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setInputMethodHints

setOpacity

setOpacity(opacity: float) -> None

X.setOpacity(opacity)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setOpacity(qreal opacity)

Sets this item's local opacity, between 0.0 (transparent) and 1.0 (opaque). The item's local opacity is combined with parent and ancestor opacities into the effectiveOpacity().

By default, opacity propagates from parent to child, so if a parent's opacity is 0.5 and the child is also 0.5, the child's effective opacity will be 0.25.

The opacity property decides the state of the painter passed to the paint() function. If the item is cached, i.e., ItemCoordinateCache or DeviceCoordinateCache, the effective property will be applied to the item's cache as it is rendered.

There are two item flags that affect how the item's opacity is combined with the parent: ItemIgnoresParentOpacity and ItemDoesntPropagateOpacityToChildren.

Note: Setting the opacity of an item to 0 will not make the item invisible (according to isVisible()), but the item will be treated like an invisible one. See the documentation of setVisible() for more information.

This function was introduced in Qt 4.5.

See also opacity(), effectiveOpacity(), and setVisible().

Upstream PySide2 reference signatures (binding differences may apply):

setOpacity(self, opacity: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setOpacity

setPanelModality

setPanelModality(panelModality: Any) -> None

X.setPanelModality(panelModality)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setPanelModality(QGraphicsItem::PanelModality panelModality)

Sets the modality for this item to panelModality.

Changing the modality of a visible item takes effect immediately.

This function was introduced in Qt 4.6.

See also panelModality().

Upstream PySide2 reference signatures (binding differences may apply):

setPanelModality(self, panelModality: PySide2.QtWidgets.QGraphicsItem.PanelModality) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setPanelModality

setParentItem

setParentItem(parent: Any) -> None

X.setParentItem(parent)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setParentItem(QGraphicsItem *newParent)

Sets this item's parent item to newParent. If this item already has a parent, it is first removed from the previous parent. If newParent is 0, this item will become a top-level item.

Note that this implicitly adds this graphics item to the scene of the parent. You should not add the item to the scene yourself.

The behavior when calling this function on an item that is an ancestor of newParent is undefined.

See also parentItem() and childItems().

Upstream PySide2 reference signatures (binding differences may apply):

setParentItem(self, parent: PySide2.QtWidgets.QGraphicsItem) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setParentItem

setPos

setPos(x: Any, y: Any) -> None

X.setPos(x, y)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setPos(const QPointF \&pos)

Sets the position of the item to pos, which is in parent coordinates. For items with no parent, pos is in scene coordinates.

The position of the item describes its origin (local coordinate (0, 0)) in parent coordinates.

See also pos(), scenePos(), and The Graphics View Coordinate System.

void QGraphicsItem::setPos(qreal x, qreal y)

This is an overloaded function.

This convenience function is equivalent to calling setPos(QPointF(x, y)).

Upstream PySide2 reference signatures (binding differences may apply):

setPos(self, pos: PySide2.QtCore.QPointF) -> None
setPos(self, x: float, y: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setPos

setRotation

setRotation(angle: float) -> None

X.setRotation(angle)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setRotation(qreal angle)

Sets the clockwise rotation angle, in degrees, around the Z axis. The default value is 0 (i.e., the item is not rotated). Assigning a negative value will rotate the item counter-clockwise. Normally the rotation angle is in the range (-360, 360), but it's also possible to assign values outside of this range (e.g., a rotation of 370 degrees is the same as a rotation of 10 degrees).

The item is rotated around its transform origin point, which by default is (0, 0). You can select a different transformation origin by calling setTransformOriginPoint().

The rotation is combined with the item's scale(), transform() and transformations() to map the item's coordinate system to the parent item.

This function was introduced in Qt 4.6.

See also rotation(), setTransformOriginPoint(), and Transformations.

Upstream PySide2 reference signatures (binding differences may apply):

setRotation(self, angle: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setRotation

setScale

setScale(scale: float) -> None

X.setScale(scale)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setScale(qreal factor)

Sets the scale factor of the item. The default scale factor is 1.0 (i.e., the item is not scaled). A scale factor of 0.0 will collapse the item to a single point. If you provide a negative scale factor, the item will be flipped and mirrored (i.e., rotated 180 degrees).

The item is scaled around its transform origin point, which by default is (0, 0). You can select a different transformation origin by calling setTransformOriginPoint().

The scale is combined with the item's rotation(), transform() and transformations() to map the item's coordinate system to the parent item.

This function was introduced in Qt 4.6.

See also scale(), setTransformOriginPoint(), and Transformations Example.

Upstream PySide2 reference signatures (binding differences may apply):

setScale(self, scale: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setScale

setSelected

setSelected(selected: bool) -> None

X.setSelected(selected)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setSelected(bool selected)

If selected is true and this item is selectable, this item is selected; otherwise, it is unselected.

If the item is in a group, the whole group's selected state is toggled by this function. If the group is selected, all items in the group are also selected, and if the group is not selected, no item in the group is selected.

Only visible, enabled, selectable items can be selected. If selected is true and this item is either invisible or disabled or unselectable, this function does nothing.

By default, items cannot be selected. To enable selection, set the ItemIsSelectable flag.

This function is provided for convenience, allowing individual toggling of the selected state of an item. However, a more common way of selecting items is to call QGraphicsScene::setSelectionArea(), which will call this function for all visible, enabled, and selectable items within a specified area on the scene.

See also isSelected() and QGraphicsScene::selectedItems().

Upstream PySide2 reference signatures (binding differences may apply):

setSelected(self, selected: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setSelected

setToolTip

setToolTip(toolTip: str) -> None

X.setToolTip(toolTip)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setToolTip(const QString \&toolTip)

Sets the item's tool tip to toolTip. If toolTip is empty, the item's tool tip is cleared.

See also toolTip() and QToolTip.

Upstream PySide2 reference signatures (binding differences may apply):

setToolTip(self, toolTip: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setToolTip

setTransform

setTransform(matrix: Any, combine: bool) -> None

X.setTransform(matrix, combine)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setTransform(const QTransform \&matrix, bool combine \= false)

Sets the item's current transformation matrix to matrix.

If combine is true, then matrix is combined with the current matrix; otherwise, matrix replaces the current matrix. combine is false by default.

To simplify interaction with items using a transformed view, QGraphicsItem provides mapTo... and mapFrom... functions that can translate between items' and the scene's coordinates. For example, you can call mapToScene() to map an item coordinate to a scene coordinate, or mapFromScene() to map from scene coordinates to item coordinates.

The transformation matrix is combined with the item's rotation(), scale() and transformations() into a combined transformation that maps the item's coordinate system to its parent.

This function was introduced in Qt 4.3.

See also transform(), setRotation(), setScale(), setTransformOriginPoint(), The Graphics View Coordinate System, and Transformations.

Upstream PySide2 reference signatures (binding differences may apply):

setTransform(self, matrix: PySide2.QtGui.QTransform, combine: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setTransform

setTransformOriginPoint

setTransformOriginPoint(ax: Any, ay: Any) -> None

X.setTransformOriginPoint(ax, ay)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setTransformOriginPoint(const QPointF \&origin)

Sets the origin point for the transformation in item coordinates.

This function was introduced in Qt 4.6.

See also transformOriginPoint() and Transformations.

void QGraphicsItem::setTransformOriginPoint(qreal x, qreal y)

This is an overloaded function.

Sets the origin point for the transformation in item coordinates. This is equivalent to calling setTransformOriginPoint(QPointF(x, y)).

This function was introduced in Qt 4.6.

See also setTransformOriginPoint() and Transformations.

Upstream PySide2 reference signatures (binding differences may apply):

setTransformOriginPoint(self, ax: float, ay: float) -> None
setTransformOriginPoint(self, origin: PySide2.QtCore.QPointF) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setTransformOriginPoint

setTransformations

setTransformations(transformations: Any) -> None

X.setTransformations(transformations)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setTransformations(const QList\<QGraphicsTransform *> \&transformations)

Sets a list of graphics transformations (QGraphicsTransform) that currently apply to this item.

If all you want is to rotate or scale an item, you should call setRotation() or setScale() instead. If you want to set an arbitrary transformation on an item, you can call setTransform().

QGraphicsTransform is for applying and controlling a chain of individual transformation operations on an item. It's particularly useful in animations, where each transform operation needs to be interpolated independently, or differently.

The transformations are combined with the item's rotation(), scale() and transform() to map the item's coordinate system to the parent item.

This function was introduced in Qt 4.6.

See also transformations(), scale(), setTransformOriginPoint(), and Transformations.

Upstream PySide2 reference signatures (binding differences may apply):

setTransformations(self, transformations: typing.Sequence[PySide2.QtWidgets.QGraphicsTransform]) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setTransformations

setVisible

setVisible(visible: bool) -> None

X.setVisible(visible)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setVisible(bool visible)

If visible is true, the item is made visible. Otherwise, the item is made invisible. Invisible items are not painted, nor do they receive any events. In particular, mouse events pass right through invisible items, and are delivered to any item that may be behind. Invisible items are also unselectable, they cannot take input focus, and are not detected by QGraphicsScene's item location functions.

If an item becomes invisible while grabbing the mouse, (i.e., while it is receiving mouse events,) it will automatically lose the mouse grab, and the grab is not regained by making the item visible again; it must receive a new mouse press to regain the mouse grab.

Similarly, an invisible item cannot have focus, so if the item has focus when it becomes invisible, it will lose focus, and the focus is not regained by simply making the item visible again.

If you hide a parent item, all its children will also be hidden. If you show a parent item, all children will be shown, unless they have been explicitly hidden (i.e., if you call setVisible(false) on a child, it will not be reshown even if its parent is hidden, and then shown again).

Items are visible by default; it is unnecessary to call setVisible() on a new item.

Note: An item with opacity set to 0 will still be considered visible, although it will be treated like an invisible item: mouse events will pass through it, it will not be included in the items returned by QGraphicsView::items(), and so on. However, the item will retain the focus.

See also isVisible(), show(), hide(), and setOpacity().

Upstream PySide2 reference signatures (binding differences may apply):

setVisible(self, visible: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setVisible

setX

setX(x: float) -> None

X.setX(x)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setX(qreal x)

Set's the x coordinate of the item's position. Equivalent to calling setPos(x, y()).

This function was introduced in Qt 4.6.

See also x() and setPos().

Upstream PySide2 reference signatures (binding differences may apply):

setX(self, x: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setX

setY

setY(y: float) -> None

X.setY(y)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setY(qreal y)

Set's the y coordinate of the item's position. Equivalent to calling setPos(x(), y).

This function was introduced in Qt 4.6.

See also y(), x(), and setPos().

Upstream PySide2 reference signatures (binding differences may apply):

setY(self, y: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setY

setZValue

setZValue(z: float) -> None

X.setZValue(z)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::setZValue(qreal z)

Sets the Z-value of the item to z. The Z value decides the stacking order of sibling (neighboring) items. A sibling item of high Z value will always be drawn on top of another sibling item with a lower Z value.

If you restore the Z value, the item's insertion order will decide its stacking order.

The Z-value does not affect the item's size in any way.

The default Z-value is 0.

See also zValue(), Sorting, stackBefore(), and ItemStacksBehindParent.

Upstream PySide2 reference signatures (binding differences may apply):

setZValue(self, z: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#setZValue

shape

shape() -> Any

X.shape() -> PythonQt.QtGui.QPainterPath

Supplemental documentation: Qt 5 reference:

[virtual] QPainterPath QGraphicsItem::shape() const

Returns the shape of this item as a QPainterPath in local coordinates. The shape is used for many things, including collision detection, hit tests, and for the QGraphicsScene::items() functions.

The default implementation calls boundingRect() to return a simple rectangular shape, but subclasses can reimplement this function to return a more accurate shape for non-rectangular items. For example, a round item may choose to return an elliptic shape for better collision detection. For example:

QPainterPath RoundItem::shape() const
{
    QPainterPath path;
    path.addEllipse(boundingRect());
    return path;
}

The outline of a shape can vary depending on the width and style of the pen used when drawing. If you want to include this outline in the item's shape, you can create a shape from the stroke using QPainterPathStroker.

This function is called by the default implementations of contains() and collidesWithPath().

See also boundingRect(), contains(), prepareGeometryChange(), and QPainterPathStroker.

Upstream PySide2 reference signatures (binding differences may apply):

shape(self) -> PySide2.QtGui.QPainterPath

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#shape

show

show() -> None

X.show()

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::show()

Shows the item (items are visible by default).

This convenience function is equivalent to calling setVisible(true).

See also hide() and setVisible().

Upstream PySide2 reference signatures (binding differences may apply):

show(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#show

stackBefore

stackBefore(sibling: Any) -> None

X.stackBefore(sibling)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::stackBefore(const QGraphicsItem *sibling)

Stacks this item before sibling, which must be a sibling item (i.e., the two items must share the same parent item, or must both be toplevel items). The sibling must have the same Z value as this item, otherwise calling this function will have no effect.

By default, all sibling items are stacked by insertion order (i.e., the first item you add is drawn before the next item you add). If two items' Z values are different, then the item with the highest Z value is drawn on top. When the Z values are the same, the insertion order will decide the stacking order.

This function was introduced in Qt 4.6.

See also setZValue(), ItemStacksBehindParent, and Sorting.

Upstream PySide2 reference signatures (binding differences may apply):

stackBefore(self, sibling: PySide2.QtWidgets.QGraphicsItem) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#stackBefore

toGraphicsObject

toGraphicsObject() -> Any

X.toGraphicsObject() -> PythonQt.QtGui.QGraphicsObject

Supplemental documentation: Qt 5 reference:

QGraphicsObject *QGraphicsItem::toGraphicsObject()

Return the graphics item cast to a QGraphicsObject, if the class is actually a graphics object, 0 otherwise.

This function was introduced in Qt 4.6.

const QGraphicsObject *QGraphicsItem::toGraphicsObject() const

Return the graphics item cast to a QGraphicsObject, if the class is actually a graphics object, 0 otherwise.

This function was introduced in Qt 4.6.

Upstream PySide2 reference signatures (binding differences may apply):

toGraphicsObject(self) -> PySide2.QtWidgets.QGraphicsObject

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#toGraphicsObject

toolTip

toolTip() -> str

X.toolTip() -> str

Supplemental documentation: Qt 5 reference:

QString QGraphicsItem::toolTip() const

Returns the item's tool tip, or an empty QString if no tool tip has been set.

See also setToolTip() and QToolTip.

Upstream PySide2 reference signatures (binding differences may apply):

toolTip(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#toolTip

topLevelItem

topLevelItem() -> Any

X.topLevelItem() -> PythonQt.QtGui.QGraphicsItem

Supplemental documentation: Qt 5 reference:

QGraphicsItem *QGraphicsItem::topLevelItem() const

Returns this item's top-level item. The top-level item is the item's topmost ancestor item whose parent is nullptr. If an item has no parent, its own pointer is returned (i.e., a top-level item is its own top-level item).

See also parentItem().

Upstream PySide2 reference signatures (binding differences may apply):

topLevelItem(self) -> PySide2.QtWidgets.QGraphicsItem

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#topLevelItem

topLevelWidget

topLevelWidget() -> Any

X.topLevelWidget() -> PythonQt.QtGui.QGraphicsWidget

Supplemental documentation: Qt 5 reference:

QGraphicsWidget *QGraphicsItem::topLevelWidget() const

Returns a pointer to the item's top level widget (i.e., the item's ancestor whose parent is nullptr, or whose parent is not a widget), or nullptr if this item does not have a top level widget. If the item is its own top level widget, this function returns a pointer to the item itself.

This function was introduced in Qt 4.4.

Upstream PySide2 reference signatures (binding differences may apply):

topLevelWidget(self) -> PySide2.QtWidgets.QGraphicsWidget

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#topLevelWidget

transform

transform() -> Any

X.transform() -> PythonQt.QtGui.QTransform

Supplemental documentation: Qt 5 reference:

QTransform QGraphicsItem::transform() const

Returns this item's transformation matrix.

The transformation matrix is combined with the item's rotation(), scale() and transformations() into a combined transformations for the item.

The default transformation matrix is an identity matrix.

This function was introduced in Qt 4.3.

See also setTransform() and sceneTransform().

Upstream PySide2 reference signatures (binding differences may apply):

transform(self) -> PySide2.QtGui.QTransform

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#transform

transformOriginPoint

transformOriginPoint() -> Any

X.transformOriginPoint() -> PythonQt.QtCore.QPointF

Supplemental documentation: Qt 5 reference:

QPointF QGraphicsItem::transformOriginPoint() const

Returns the origin point for the transformation in item coordinates.

The default is QPointF(0,0).

This function was introduced in Qt 4.6.

See also setTransformOriginPoint() and Transformations.

Upstream PySide2 reference signatures (binding differences may apply):

transformOriginPoint(self) -> PySide2.QtCore.QPointF

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#transformOriginPoint

transformations

transformations() -> tuple

X.transformations() -> tuple

Supplemental documentation: Qt 5 reference:

QList\<QGraphicsTransform *> QGraphicsItem::transformations() const

Returns a list of graphics transforms that currently apply to this item.

QGraphicsTransform is for applying and controlling a chain of individual transformation operations on an item. It's particularly useful in animations, where each transform operation needs to be interpolated independently, or differently.

The transformations are combined with the item's rotation(), scale() and transform() to map the item's coordinate system to the parent item.

This function was introduced in Qt 4.6.

See also setTransformations(), scale(), rotation(), transformOriginPoint(), and Transformations.

Upstream PySide2 reference signatures (binding differences may apply):

transformations(self) -> typing.List[PySide2.QtWidgets.QGraphicsTransform]

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#transformations

type

type() -> int

X.type() -> int

Supplemental documentation: Qt 5 reference:

[virtual] int QGraphicsItem::type() const

Returns the type of an item as an int. All standard graphicsitem classes are associated with a unique value; see QGraphicsItem::Type. This type information is used by qgraphicsitem_cast() to distinguish between types.

The default implementation (in QGraphicsItem) returns UserType.

To enable use of qgraphicsitem_cast() with a custom item, reimplement this function and declare a Type enum value equal to your custom item's type. Custom items must return a value larger than or equal to UserType (65536).

For example:

class CustomItem : public QGraphicsItem
{
public:
   enum { Type = UserType + 1 };

   int type() const override
   {
       // Enable the use of qgraphicsitem_cast with this item.
       return Type;
   }
   ...
};

See also UserType.

Upstream PySide2 reference signatures (binding differences may apply):

type(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#type

ungrabKeyboard

ungrabKeyboard() -> None

X.ungrabKeyboard()

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::ungrabKeyboard()

Releases the keyboard grab.

This function was introduced in Qt 4.4.

See also grabKeyboard() and ungrabMouse().

Upstream PySide2 reference signatures (binding differences may apply):

ungrabKeyboard(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#ungrabKeyboard

ungrabMouse

ungrabMouse() -> None

X.ungrabMouse()

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::ungrabMouse()

Releases the mouse grab.

This function was introduced in Qt 4.4.

See also grabMouse() and ungrabKeyboard().

Upstream PySide2 reference signatures (binding differences may apply):

ungrabMouse(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#ungrabMouse

unsetCursor

unsetCursor() -> None

X.unsetCursor()

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::unsetCursor()

Clears the cursor from this item.

See also hasCursor() and setCursor().

Upstream PySide2 reference signatures (binding differences may apply):

unsetCursor(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#unsetCursor

update

update(x: Any, y: Any, width: Any, height: Any) -> None

X.update(x, y, width, height)

Supplemental documentation: Qt 5 reference:

void QGraphicsItem::update(const QRectF \&rect \= QRectF())

Schedules a redraw of the area covered by rect in this item. You can call this function whenever your item needs to be redrawn, such as if it changes appearance or size.

This function does not cause an immediate paint; instead it schedules a paint request that is processed by QGraphicsView after control reaches the event loop. The item will only be redrawn if it is visible in any associated view.

As a side effect of the item being repainted, other items that overlap the area rect may also be repainted.

If the item is invisible (i.e., isVisible() returns false), this function does nothing.

See also paint() and boundingRect().

void QGraphicsItem::update(qreal x, qreal y, qreal width, qreal height)

This is an overloaded function.

This convenience function is equivalent to calling update(QRectF(x, y, width, height)).

Upstream PySide2 reference signatures (binding differences may apply):

update(self, rect: PySide2.QtCore.QRectF=...) -> None
update(self, x: float, y: float, width: float, height: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#update

updateMicroFocus

updateMicroFocus() -> None

X.updateMicroFocus()

Supplemental documentation: Qt 5 reference:

[protected] void QGraphicsItem::updateMicroFocus()

Updates the item's micro focus.

This function was introduced in Qt 4.7.

See also QInputMethod.

Upstream PySide2 reference signatures (binding differences may apply):

updateMicroFocus(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#updateMicroFocus

wheelEvent

wheelEvent(event: Any) -> None

X.wheelEvent(event)

Supplemental documentation: Qt 5 reference:

[virtual protected] void QGraphicsItem::wheelEvent(QGraphicsSceneWheelEvent *event)

This event handler, for event event, can be reimplemented to receive wheel events for this item. If you reimplement this function, event will be accepted by default.

If you ignore the event, (i.e., by calling QEvent::ignore(),) it will propagate to any item beneath this item. If no items accept the event, it will be ignored by the scene, and propagate to the view (e.g., the view's vertical scroll bar).

The default implementation ignores the event.

See also sceneEvent().

Upstream PySide2 reference signatures (binding differences may apply):

wheelEvent(self, event: PySide2.QtWidgets.QGraphicsSceneWheelEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsitem.html#wheelEvent