QMarginsF

The QMarginsF class defines the four margins of a rectangle. More

Inheritance diagram of PySide2.QtCore.QMarginsF

New in version 5.3.

Synopsis

Functions

Detailed Description

QMarginsF defines a set of four margins; left, top, right and bottom, that describe the size of the borders surrounding a rectangle.

The isNull() function returns true only if all margins are very close to zero.

QMarginsF objects can be streamed as well as compared.

class PySide2.QtCore.QMarginsF

PySide2.QtCore.QMarginsF(margins)

PySide2.QtCore.QMarginsF(QMarginsF)

PySide2.QtCore.QMarginsF(left, top, right, bottom)

param bottom:

float

param QMarginsF:

PySide2.QtCore.QMarginsF

param top:

float

param right:

float

param left:

float

param margins:

PySide2.QtCore.QMargins

Constructs a margins object with all margins set to 0.

See also

isNull()

Constructs margins copied from the given margins

Constructs margins with the given left , top , right , bottom

PySide2.QtCore.QMarginsF.bottom()
Return type:

float

Returns the bottom margin.

See also

setBottom()

PySide2.QtCore.QMarginsF.isNull()
Return type:

bool

Returns true if all margins are very close to 0; otherwise returns false.

See also

qFuzzyIsNull

PySide2.QtCore.QMarginsF.left()
Return type:

float

Returns the left margin.

See also

setLeft()

PySide2.QtCore.QMarginsF.__ne__(rhs)
Parameters:

rhsPySide2.QtCore.QMarginsF

Return type:

bool

PySide2.QtCore.QMarginsF.__mul__(lhs)
Parameters:

lhs – float

Return type:

PySide2.QtCore.QMarginsF

PySide2.QtCore.QMarginsF.__mul__(rhs)
Parameters:

rhs – float

Return type:

PySide2.QtCore.QMarginsF

PySide2.QtCore.QMarginsF.__imul__(factor)
Parameters:

factor – float

Return type:

PySide2.QtCore.QMarginsF

Multiplies each component of this object by factor and returns a reference to it.

See also

operator/=()

PySide2.QtCore.QMarginsF.__add__()
Return type:

PySide2.QtCore.QMarginsF

PySide2.QtCore.QMarginsF.__add__(rhs)
Parameters:

rhsPySide2.QtCore.QMarginsF

Return type:

PySide2.QtCore.QMarginsF

Returns a QMargin object that is formed from all components of margins .

PySide2.QtCore.QMarginsF.__add__(lhs)
Parameters:

lhs – float

Return type:

PySide2.QtCore.QMarginsF

Returns a QMargin object that is formed from all components of margins .

PySide2.QtCore.QMarginsF.__add__(rhs)
Parameters:

rhs – float

Return type:

PySide2.QtCore.QMarginsF

Returns a QMargin object that is formed from all components of margins .

PySide2.QtCore.QMarginsF.__iadd__(addend)
Parameters:

addend – float

Return type:

PySide2.QtCore.QMarginsF

This is an overloaded function.

Adds the addend to each component of this object and returns a reference to it.

See also

operator-=()

PySide2.QtCore.QMarginsF.__iadd__(margins)
Parameters:

marginsPySide2.QtCore.QMarginsF

Return type:

PySide2.QtCore.QMarginsF

PySide2.QtCore.QMarginsF.__sub__()
Return type:

PySide2.QtCore.QMarginsF

PySide2.QtCore.QMarginsF.__sub__(rhs)
Parameters:

rhsPySide2.QtCore.QMarginsF

Return type:

PySide2.QtCore.QMarginsF

Returns a QMargin object that is formed by negating all components of margins .

PySide2.QtCore.QMarginsF.__sub__(rhs)
Parameters:

rhs – float

Return type:

PySide2.QtCore.QMarginsF

Returns a QMargin object that is formed by negating all components of margins .

PySide2.QtCore.QMarginsF.__isub__(margins)
Parameters:

marginsPySide2.QtCore.QMarginsF

Return type:

PySide2.QtCore.QMarginsF

PySide2.QtCore.QMarginsF.__isub__(subtrahend)
Parameters:

subtrahend – float

Return type:

PySide2.QtCore.QMarginsF

This is an overloaded function.

Subtracts the subtrahend from each component of this object and returns a reference to it.

See also

operator+=()

PySide2.QtCore.QMarginsF.__div__(divisor)
Parameters:

divisor – float

Return type:

PySide2.QtCore.QMarginsF

PySide2.QtCore.QMarginsF.__idiv__(divisor)
Parameters:

divisor – float

Return type:

PySide2.QtCore.QMarginsF

Divides each component of this object by divisor and returns a reference to it.

See also

operator*=()

PySide2.QtCore.QMarginsF.__eq__(rhs)
Parameters:

rhsPySide2.QtCore.QMarginsF

Return type:

bool

PySide2.QtCore.QMarginsF.right()
Return type:

float

Returns the right margin.

See also

setRight()

PySide2.QtCore.QMarginsF.setBottom(bottom)
Parameters:

bottom – float

Sets the bottom margin to bottom .

See also

bottom()

PySide2.QtCore.QMarginsF.setLeft(left)
Parameters:

left – float

Sets the left margin to left .

See also

left()

PySide2.QtCore.QMarginsF.setRight(right)
Parameters:

right – float

Sets the right margin to right .

See also

right()

PySide2.QtCore.QMarginsF.setTop(top)
Parameters:

top – float

Sets the Top margin to Top .

See also

top()

PySide2.QtCore.QMarginsF.toMargins()
Return type:

PySide2.QtCore.QMargins

Returns an integer based copy of this margins object.

Note that the components in the returned margins will be rounded to the nearest integer.

See also

QMarginsF()

PySide2.QtCore.QMarginsF.top()
Return type:

float

Returns the top margin.

See also

setTop()