QMargins Class

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

Header: #include <QMargins>
qmake: QT += core
Since: Qt 4.6

Public Functions

QMargins &operator/=(int divisor)
QMargins &operator/=(qreal divisor)
QDataStream &operator<<(QDataStream &stream, const QMargins &m)
QDataStream &operator>>(QDataStream &stream, QMargins &m)

Detailed Description

The QMargins class defines the four margins of a rectangle.

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.

Member Function Documentation

QMargins &QMargins::operator/=(int divisor)

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

This function was introduced in Qt 5.1.

See also operator*=().

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

This is an overloaded function.

This function was introduced in Qt 5.1.

See also operator*=().

Related Non-Members

QDataStream &operator<<(QDataStream &stream, const QMargins &m)

Writes margin m to the given stream and returns a reference to the stream.

See also Serializing Qt Data Types.

QDataStream &operator>>(QDataStream &stream, QMargins &m)

Reads a margin from the given stream into margin m and returns a reference to the stream.

See also Serializing Qt Data Types.