- class QGraphicsScale#
The
QGraphicsScale
class provides a scale transformation. More…New in version 4.6.
Synopsis#
Properties#
Methods#
def
__init__()
def
origin()
def
setOrigin()
def
setXScale()
def
setYScale()
def
setZScale()
def
xScale()
def
yScale()
def
zScale()
Signals#
def
originChanged()
def
scaleChanged()
def
xScaleChanged()
def
yScaleChanged()
def
zScaleChanged()
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
, andzScale
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 negativexScale
value will mirror the item horizontally. A negativeyScale
value will flip the item vertically. A negativezScale
will flip the item end for end.See also
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.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).
- Access functions:
Signal
originChanged()
- property 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.
- Access functions:
Signal
xScaleChanged()
- property 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.
- Access functions:
Signal
yScaleChanged()
- property 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.
- Access functions:
Signal
zScaleChanged()
Constructs an empty
QGraphicsScale
object with the givenparent
.- origin()#
- Return type:
See also
Getter of property
originᅟ
.- originChanged()#
QGraphicsScale
emits this signal when its origin changes.See also
Notification signal of property
originᅟ
.- scaleChanged()#
This signal is emitted whenever the
xScale
,yScale
, orzScale
of the object changes.Setter of property
originᅟ
.Setter of property
xScaleᅟ
.Setter of property
yScaleᅟ
.Setter of property
zScaleᅟ
.- xScale()#
- Return type:
float
See also
Getter of property
xScaleᅟ
.- xScaleChanged()#
This signal is emitted whenever the
xScale
property changes.Notification signal of property
xScaleᅟ
.- yScale()#
- Return type:
float
See also
Getter of property
yScaleᅟ
.- yScaleChanged()#
This signal is emitted whenever the
yScale
property changes.Notification signal of property
yScaleᅟ
.- zScale()#
- Return type:
float
See also
Getter of property
zScaleᅟ
.- zScaleChanged()#
This signal is emitted whenever the
zScale
property changes.Notification signal of property
zScaleᅟ
.