QMargins

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

Inheritance diagram of PySide2.QtCore.QMargins

New in version 4.6.

Synopsis

Functions

Detailed Description

QMargin 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 set to zero.

QMargin objects can be streamed as well as compared.

class QMargins

QMargins(QMargins)

QMargins(left, top, right, bottom)

param QMargins

QMargins

param bottom

int

param top

int

param right

int

param left

int

Constructs a margins object with all margins set to 0.

See also

isNull()

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

PySide2.QtCore.QMargins.bottom()
Return type

int

Returns the bottom margin.

See also

setBottom()

PySide2.QtCore.QMargins.isNull()
Return type

bool

Returns true if all margins are is 0; otherwise returns false.

PySide2.QtCore.QMargins.left()
Return type

int

Returns the left margin.

See also

setLeft()

PySide2.QtCore.QMargins.__ne__(m2)
Parameters

m2QMargins

Return type

bool

PySide2.QtCore.QMargins.__mul__(factor)
Parameters

factorint

Return type

QMargins

PySide2.QtCore.QMargins.__mul__(factor)
Parameters

factorint

Return type

QMargins

PySide2.QtCore.QMargins.__mul__(factor)
Parameters

factorqreal

Return type

QMargins

PySide2.QtCore.QMargins.__mul__(factor)
Parameters

factorqreal

Return type

QMargins

PySide2.QtCore.QMargins.__imul__(arg__1)
Parameters

arg__1int

Return type

QMargins

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

See also

operator/=()

PySide2.QtCore.QMargins.__imul__(arg__1)
Parameters

arg__1qreal

Return type

QMargins

This is an overloaded function.

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

See also

operator/=()

PySide2.QtCore.QMargins.__add__()
Return type

QMargins

PySide2.QtCore.QMargins.__add__(m2)
Parameters

m2QMargins

Return type

QMargins

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

PySide2.QtCore.QMargins.__add__(lhs)
Parameters

lhsint

Return type

QMargins

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

PySide2.QtCore.QMargins.__add__(rhs)
Parameters

rhsint

Return type

QMargins

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

PySide2.QtCore.QMargins.__iadd__(margins)
Parameters

marginsQMargins

Return type

QMargins

PySide2.QtCore.QMargins.__iadd__(arg__1)
Parameters

arg__1int

Return type

QMargins

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.QMargins.__sub__()
Return type

QMargins

PySide2.QtCore.QMargins.__sub__(m2)
Parameters

m2QMargins

Return type

QMargins

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

PySide2.QtCore.QMargins.__sub__(rhs)
Parameters

rhsint

Return type

QMargins

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

PySide2.QtCore.QMargins.__isub__(margins)
Parameters

marginsQMargins

Return type

QMargins

PySide2.QtCore.QMargins.__isub__(arg__1)
Parameters

arg__1int

Return type

QMargins

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.QMargins.__div__(divisor)
Parameters

divisorint

Return type

QMargins

PySide2.QtCore.QMargins.__div__(divisor)
Parameters

divisorqreal

Return type

QMargins

PySide2.QtCore.QMargins.__idiv__(arg__1)
Parameters

arg__1int

Return type

QMargins

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

See also

operator*=()

PySide2.QtCore.QMargins.__idiv__(arg__1)
Parameters

arg__1qreal

Return type

QMargins

This is an overloaded function.

See also

operator*=()

PySide2.QtCore.QMargins.__eq__(m2)
Parameters

m2QMargins

Return type

bool

PySide2.QtCore.QMargins.right()
Return type

int

Returns the right margin.

See also

setRight()

PySide2.QtCore.QMargins.setBottom(bottom)
Parameters

bottomint

Sets the bottom margin to bottom .

See also

bottom()

PySide2.QtCore.QMargins.setLeft(left)
Parameters

leftint

Sets the left margin to left .

See also

left()

PySide2.QtCore.QMargins.setRight(right)
Parameters

rightint

Sets the right margin to right .

See also

right()

PySide2.QtCore.QMargins.setTop(top)
Parameters

topint

Sets the Top margin to Top .

See also

top()

PySide2.QtCore.QMargins.top()
Return type

int

Returns the top margin.

See also

setTop()