Class: QgsMargins

class qgis.core.QgsMargins

Bases: sip.wrapper

Constructs a margins object with all margins set to 0.

QgsMargins(left: float, top: float, right: float, bottom: float) Constructs margins with the given left, top, right, bottom

See also

setLeft()

See also

setRight()

See also

setTop()

See also

setBottom()

QgsMargins(QgsMargins)

Enums

Methods

bottom

Returns the bottom margin.

fromString

Returns a QgsMargins object decoded from a string, or a null QgsMargins if the string could not be interpreted as margins.

isNull

Returns c True if all margins are is 0; otherwise returns False.

left

Returns the left margin.

right

Returns the right margin.

setBottom

Sets the bottom margin to bottom.

setLeft

Sets the left margin to left.

setRight

Sets the right margin to right.

setTop

Sets the top margin to top.

toString

Returns the margins encoded to a string.

top

Returns the top margin.

Signals

Attributes

bottom(self) → float

Returns the bottom margin.

See also

setBottom()

fromString(string: str) → QgsMargins

Returns a QgsMargins object decoded from a string, or a null QgsMargins if the string could not be interpreted as margins.

See also

toString()

isNull(self) → bool

Returns c True if all margins are is 0; otherwise returns False.

left(self) → float

Returns the left margin.

See also

setLeft()

right(self) → float

Returns the right margin.

See also

setRight()

setBottom(self, bottom: float)

Sets the bottom margin to bottom.

See also

bottom()

setLeft(self, left: float)

Sets the left margin to left.

See also

left()

setRight(self, right: float)

Sets the right margin to right.

See also

right()

setTop(self, top: float)

Sets the top margin to top.

See also

top()

toString(self) → str

Returns the margins encoded to a string.

See also

fromString()

top(self) → float

Returns the top margin.

See also

setTop()