QMarginsF Class

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

Header: #include <QMarginsF>
qmake: QT += core
Since: Qt 5.3

Public Functions

QMarginsF()
QMarginsF(qreal left, qreal top, qreal right, qreal bottom)
QMarginsF(const QMargins &margins)
qreal bottom() const
bool isNull() const
qreal left() const
qreal right() const
void setBottom(qreal bottom)
void setLeft(qreal left)
void setRight(qreal right)
void setTop(qreal top)
QMargins toMargins() const
qreal top() const
QMarginsF &operator*=(qreal factor)
QMarginsF &operator+=(const QMarginsF &margins)
QMarginsF &operator+=(qreal addend)
QMarginsF &operator-=(const QMarginsF &margins)
QMarginsF &operator-=(qreal subtrahend)
QMarginsF &operator/=(qreal divisor)

Detailed Description

The QMarginsF class defines the four margins of a rectangle.

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

QMarginsF objects can be streamed as well as compared.

Member Type Documentation

Property Documentation

Member Function Documentation

QMarginsF::QMarginsF()

Default constructs an instance of QMarginsF.

QMarginsF::QMarginsF(qreal left, qreal top, qreal right, qreal bottom)

Default constructs an instance of QMarginsF.

QMarginsF::QMarginsF(const QMargins &margins)

Default constructs an instance of QMarginsF.

qreal QMarginsF::bottom() const

See also setBottom().

bool QMarginsF::isNull() const

qreal QMarginsF::left() const

See also setLeft().

See also setRight().

void QMarginsF::setBottom(qreal bottom)

See also bottom().

void QMarginsF::setLeft(qreal left)

See also left().

void QMarginsF::setRight(qreal right)

See also right().

void QMarginsF::setTop(qreal top)

See also top().

QMargins QMarginsF::toMargins() const

qreal QMarginsF::top() const

See also setTop().

QMarginsF &QMarginsF::operator*=(qreal factor)

QMarginsF &QMarginsF::operator+=(const QMarginsF &margins)

QMarginsF &QMarginsF::operator+=(qreal addend)

QMarginsF &QMarginsF::operator-=(const QMarginsF &margins)

QMarginsF &QMarginsF::operator-=(qreal subtrahend)

QMarginsF &QMarginsF::operator/=(qreal divisor)

Member Variable Documentation

Related Non-Members

Macro Documentation