QGraphicsScale

The QGraphicsScale class provides a scale transformation. More

Inheritance diagram of PySide2.QtWidgets.QGraphicsScale

New in version 4.6.

Synopsis

Functions

Signals

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 PySide2.QtWidgets.QGraphicsScale([parent=None])
param parent

PySide2.QtCore.QObject

Constructs an empty QGraphicsScale object with the given parent .

PySide2.QtWidgets.QGraphicsScale.origin()
Return type

PySide2.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

PySide2.QtWidgets.QGraphicsScale.originChanged()
PySide2.QtWidgets.QGraphicsScale.scaleChanged()
PySide2.QtWidgets.QGraphicsScale.setOrigin(point)
Parameters

pointPySide2.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

PySide2.QtWidgets.QGraphicsScale.setXScale(arg__1)
Parameters

arg__1 – 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

PySide2.QtWidgets.QGraphicsScale.setYScale(arg__1)
Parameters

arg__1 – 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

PySide2.QtWidgets.QGraphicsScale.setZScale(arg__1)
Parameters

arg__1 – 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

PySide2.QtWidgets.QGraphicsScale.xScale()
Return type

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

PySide2.QtWidgets.QGraphicsScale.xScaleChanged()
PySide2.QtWidgets.QGraphicsScale.yScale()
Return type

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

PySide2.QtWidgets.QGraphicsScale.yScaleChanged()
PySide2.QtWidgets.QGraphicsScale.zScale()
Return type

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

PySide2.QtWidgets.QGraphicsScale.zScaleChanged()