QGraphicsScale#

The QGraphicsScale class provides a scale transformation. More

Inheritance diagram of PySide6.QtWidgets.QGraphicsScale

New in version 4.6.

Synopsis#

Properties#

  • origin - The origin of the scale in 3D space

  • xScale - The horizontal scale factor

  • yScale - The vertical scale factor

  • zScale - The depth scale factor

Functions#

Signals#

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#

QGraphicsScene provides certain parameters to help control how the scale should be applied.

The origin is the point that the item is scaled from (i.e., it stays fixed relative to the parent as the rest of the item grows). By default the origin is QPointF (0, 0).

The parameters xScale , yScale , and zScale describe the scale factors to apply in horizontal, vertical, and depth directions. They can take on any value, including 0 (to collapse the item to a point) or negative value. A negative xScale value will mirror the item horizontally. A negative yScale value will flip the item vertically. A negative zScale will flip the item end for end.

See also

QGraphicsTransform setScale() scale()

class PySide6.QtWidgets.QGraphicsScale([parent=None])#
Parameters:

parentPySide6.QtCore.QObject

Constructs an empty QGraphicsScale object with the given parent.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property PᅟySide6.QtWidgets.QGraphicsScale.origin: PySide6.QtGui.QVector3D#

This property holds the origin of the scale in 3D space..

All scaling will be done relative to this point (i.e., this point will stay fixed, relative to the parent, when the item is scaled).

See also

xScale yScale zScale

Access functions:
property PᅟySide6.QtWidgets.QGraphicsScale.xScale: float#

This property holds the horizontal scale factor..

The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be mirrored horizontally around its origin.

See also

yScale zScale origin

Access functions:
property PᅟySide6.QtWidgets.QGraphicsScale.yScale: float#

This property holds the vertical scale factor..

The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be flipped vertically around its origin.

See also

xScale zScale origin

Access functions:
property PᅟySide6.QtWidgets.QGraphicsScale.zScale: float#

This property holds the depth scale factor..

The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be flipped end for end around its origin.

See also

xScale yScale origin

Access functions:
PySide6.QtWidgets.QGraphicsScale.origin()#
Return type:

PySide6.QtGui.QVector3D

See also

setOrigin()

Getter of property origin .

PySide6.QtWidgets.QGraphicsScale.originChanged()#

QGraphicsScale emits this signal when its origin changes.

See also

origin

Notification signal of property origin .

PySide6.QtWidgets.QGraphicsScale.scaleChanged()#

This signal is emitted whenever the xScale , yScale , or zScale of the object changes.

See also

xScale yScale zScale

PySide6.QtWidgets.QGraphicsScale.setOrigin(point)#
Parameters:

pointPySide6.QtGui.QVector3D

See also

origin()

Setter of property origin .

PySide6.QtWidgets.QGraphicsScale.setXScale(arg__1)#
Parameters:

arg__1 – float

See also

xScale()

Setter of property xScale .

PySide6.QtWidgets.QGraphicsScale.setYScale(arg__1)#
Parameters:

arg__1 – float

See also

yScale()

Setter of property yScale .

PySide6.QtWidgets.QGraphicsScale.setZScale(arg__1)#
Parameters:

arg__1 – float

See also

zScale()

Setter of property zScale .

PySide6.QtWidgets.QGraphicsScale.xScale()#
Return type:

float

See also

setXScale()

Getter of property xScale .

PySide6.QtWidgets.QGraphicsScale.xScaleChanged()#

This signal is emitted whenever the xScale property changes.

Notification signal of property xScale .

PySide6.QtWidgets.QGraphicsScale.yScale()#
Return type:

float

See also

setYScale()

Getter of property yScale .

PySide6.QtWidgets.QGraphicsScale.yScaleChanged()#

This signal is emitted whenever the yScale property changes.

Notification signal of property yScale .

PySide6.QtWidgets.QGraphicsScale.zScale()#
Return type:

float

See also

setZScale()

Getter of property zScale .

PySide6.QtWidgets.QGraphicsScale.zScaleChanged()#

This signal is emitted whenever the zScale property changes.

Notification signal of property zScale .