Skip to content

MarginsF

Qt Base Class: QMarginsF

Signature: QMarginsF(self) -> None QMarginsF(self, QMarginsF: Union[PySide6.QtCore.QMarginsF, PySide6.QtCore.QMargins]) -> None QMarginsF(self, left: float, top: float, right: float, bottom: float) -> None QMarginsF(self, margins: PySide6.QtCore.QMargins) -> None

Base classes

Name Children Inherits
QMarginsF
PySide6.QtCore
QMarginsF(self) -> None

⋔ Inheritance diagram

graph TD
  1473299819904["core.MarginsF"]
  1473243834000["QtCore.QMarginsF"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473243834000 --> 1473299819904
  1473291690208 --> 1473243834000
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QMarginsF

Defines the four margins of a rectangle (floating point precision).

Source code in prettyqt\core\marginsf.py
class MarginsF(QtCore.QMarginsF):
    """Defines the four margins of a rectangle (floating point precision)."""

    def __repr__(self):
        return get_repr(self, self.left(), self.top(), self.right(), self.bottom())

    @property
    def _left(self) -> float:
        return self.left()

    @property
    def _top(self) -> float:
        return self.top()

    @property
    def _right(self) -> float:
        return self.right()

    @property
    def _bottom(self) -> float:
        return self.bottom()

    __match_args__ = ("_left", "_top", "_right", "_bottom")

    def __reduce__(self):
        return type(self), (self.left(), self.top(), self.right(), self.bottom())

    def __bool__(self):
        return not self.isNull()

    def __iter__(self) -> Iterator[float]:
        yield self.left()
        yield self.top()
        yield self.right()
        yield self.bottom()