Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QMargins Class Reference

\inmodule QtCore More...

#include <qmargins.h>

+ Collaboration diagram for QMargins:

Public Member Functions

constexpr QMargins () noexcept
 Constructs a margins object with all margins set to 0.
 
constexpr QMargins (int left, int top, int right, int bottom) noexcept
 Constructs margins with the given left, top, right, and bottom.
 
constexpr bool isNull () const noexcept
 Returns true if all margins are is 0; otherwise returns false.
 
constexpr int left () const noexcept
 Returns the left margin.
 
constexpr int top () const noexcept
 Returns the top margin.
 
constexpr int right () const noexcept
 Returns the right margin.
 
constexpr int bottom () const noexcept
 Returns the bottom margin.
 
constexpr void setLeft (int left) noexcept
 Sets the left margin to left.
 
constexpr void setTop (int top) noexcept
 Sets the Top margin to Top.
 
constexpr void setRight (int right) noexcept
 Sets the right margin to right.
 
constexpr void setBottom (int bottom) noexcept
 Sets the bottom margin to bottom.
 
constexpr QMarginsoperator+= (const QMargins &margins) noexcept
 Add each component of margins to the respective component of this object and returns a reference to it.
 
constexpr QMarginsoperator-= (const QMargins &margins) noexcept
 Subtract each component of margins from the respective component of this object and returns a reference to it.
 
constexpr QMarginsoperator+= (int) noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Adds the addend to each component of this object and returns a reference to it.
 
constexpr QMarginsoperator-= (int) noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Subtracts the subtrahend from each component of this object and returns a reference to it.
 
constexpr QMarginsoperator*= (int) noexcept
 Multiplies each component of this object by factor and returns a reference to it.
 
constexpr QMarginsoperator/= (int)
 Divides each component of this object by divisor and returns a reference to it.
 
constexpr QMarginsoperator*= (qreal) noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies each component of this object by factor and returns a reference to it.
 
constexpr QMarginsoperator/= (qreal)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr QMarginsF toMarginsF () const noexcept
 

Friends

constexpr bool comparesEqual (const QMargins &lhs, const QMargins &rhs) noexcept
 
template<std::size_t I, typename M , std::enable_if_t<(I< 4), bool > = true, std::enable_if_t< std::is_same_v< q20::remove_cvref_t< M >, QMargins >, bool > = true>
constexpr decltype(auto) get (M &&m) noexcept
 

Related Symbols

(Note that these are not member symbols.)

QMargins operator+ (const QMargins &m1, const QMargins &m2)
 Returns a QMargins object that is the sum of the given margins, m1 and m2; each component is added separately.
 
QMargins operator- (const QMargins &m1, const QMargins &m2)
 Returns a QMargins object that is formed by subtracting m2 from m1; each component is subtracted separately.
 
QMargins operator+ (const QMargins &lhs, int rhs)
 Returns a QMargins object that is formed by adding rhs to lhs.
 
QMargins operator+ (int lhs, const QMargins &rhs)
 Returns a QMargins object that is formed by adding lhs to rhs.
 
QMargins operator- (const QMargins &lhs, int rhs)
 Returns a QMargins object that is formed by subtracting rhs from lhs.
 
QMargins operator* (const QMargins &margins, int factor)
 Returns a QMargins object that is formed by multiplying each component of the given margins by factor.
 
QMargins operator* (int factor, const QMargins &margins)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QMargins object that is formed by multiplying each component of the given margins by factor.
 
QMargins operator* (const QMargins &margins, qreal factor)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QMargins object that is formed by multiplying each component of the given margins by factor.
 
QMargins operator* (qreal factor, const QMargins &margins)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QMargins object that is formed by multiplying each component of the given margins by factor.
 
QMargins operator/ (const QMargins &margins, int divisor)
 Returns a QMargins object that is formed by dividing the components of the given margins by the given divisor.
 
QMargins operator/ (const QMargins &, qreal)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QMargins object that is formed by dividing the components of the given margins by the given divisor.
 
QMargins operator+ (const QMargins &margins)
 Returns a QMargin object that is formed from all components of margins.
 
QMargins operator- (const QMargins &margins)
 Returns a QMargin object that is formed by negating all components of margins.
 
QMargins operator| (const QMargins &m1, const QMargins &m2)
 Returns a QMargins object that is formed from the maximum of each component of m2 and m1.
 
QDataStreamoperator<< (QDataStream &stream, const QMargins &m)
 Writes margin m to the given stream and returns a reference to the stream.
 
QDataStreamoperator>> (QDataStream &stream, QMargins &m)
 Reads a margin from the given stream into margin m and returns a reference to the stream.
 

Detailed Description

\inmodule QtCore

Since
4.6

\compares equality \compareswith equality QMarginsF \endcompareswith

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.

Definition at line 23 of file qmargins.h.

Constructor & Destructor Documentation

◆ QMargins() [1/2]

constexpr QMargins::QMargins ( )
inlineconstexprnoexcept

Constructs a margins object with all margins set to 0.

See also
isNull()

Definition at line 98 of file qmargins.h.

◆ QMargins() [2/2]

constexpr QMargins::QMargins ( int left,
int top,
int right,
int bottom )
inlineconstexprnoexcept

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

See also
setLeft(), setRight(), setTop(), setBottom()

Definition at line 100 of file qmargins.h.

Member Function Documentation

◆ bottom()

constexpr int QMargins::bottom ( ) const
inlineconstexprnoexcept

Returns the bottom margin.

Definition at line 115 of file qmargins.h.

Referenced by QWindowCreationContext::QWindowCreationContext(), QQuickStyleMargins::bottom(), calcPosition(), QAndroidStyle::drawControl(), QWindowsGeometryHint::frameSizeConstraints(), QWindowsGeometryHint::handleCalculateSize(), QtWaylandClient::QWaylandShmBuffer::imageInsideMargins(), QtWaylandClient::marginsRegion(), QLineEdit::minimumSizeHint(), operator*(), operator*(), operator*(), operator*(), operator-(), QMarginsF::operator-(), operator/(), operator/(), QSGTextMaskMaterial::populate(), QQuickTableViewPrivate::processRebuildTable(), QtWaylandClient::QWaylandShmBackingStore::recreateBackBufferIfNeeded(), QtWaylandClient::QWaylandWindow::resizeFromApplyConfigure(), QWidgetPrivate::safeAreaMargins(), QHighDpi::scale(), QLayout::setContentsMargins(), QWidget::setContentsMargins(), QToolBarLayout::setGeometry(), QtWaylandClient::QWaylandWindow::setGeometryFromApplyConfigure(), QOffscreenWindow::setWindowState(), QAndroidStyle::AndroidControl::sizeFromContents(), QLineEdit::sizeHint(), QQC2::QCommonStyle::subElementRect(), QCommonStyle::subElementRect(), QAndroidStyle::AndroidControl::subElementRect(), QAndroidStyle::AndroidProgressBarControl::subElementRect(), QWaylandQtShellSurfacePrivate::updateFrameMargins(), QWidgetPrivate::updateFrameStrut(), QQuickStyleItem::updatePaintNode(), and QtWaylandClient::QWaylandEglWindow::updateSurface().

+ Here is the caller graph for this function:

◆ isNull()

constexpr bool QMargins::isNull ( ) const
inlineconstexprnoexcept

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

Definition at line 103 of file qmargins.h.

Referenced by QWindowsWindowData::create(), QWindowsGeometryHint::handleCalculateSize(), QtWaylandClient::QWaylandShmBuffer::imageInsideMargins(), msgUnableToSetGeometry(), operator<<(), QSGSoftwareNinePatchNode::paint(), QWidgetPrivate::safeAreaMargins(), QWidgetPrivate::updateFrameStrut(), and QtWaylandClient::QWaylandWindow::windowContentMargins().

+ Here is the caller graph for this function:

◆ left()

constexpr int QMargins::left ( ) const
inlineconstexprnoexcept

Returns the left margin.

See also
setLeft()

Definition at line 106 of file qmargins.h.

Referenced by QWindowCreationContext::QWindowCreationContext(), QtWaylandClient::QWaylandShmBackingStore::beginPaint(), calcPosition(), QAndroidStyle::drawControl(), QWindowsBackingStore::flush(), QtWaylandClient::QWaylandShmBackingStore::flush(), QWindowsGeometryHint::frameSizeConstraints(), QWindowsGeometryHint::handleCalculateSize(), QWindowsWindow::handleGeometryChangingMessage(), QtWaylandClient::QWaylandShmBuffer::imageInsideMargins(), QToolBarLayout::layoutActions(), QQuickStyleMargins::left(), QtWaylandClient::QWaylandWindow::mapFromWlSurface(), QtWaylandClient::marginsRegion(), QLineEdit::minimumSizeHint(), operator*(), operator*(), operator*(), operator*(), operator-(), QMarginsF::operator-(), operator/(), operator/(), QtWaylandClient::QWaylandAdwaitaDecoration::paint(), QSGTextMaskMaterial::populate(), QQuickTableViewPrivate::processRebuildTable(), QtWaylandClient::QWaylandShmBackingStore::recreateBackBufferIfNeeded(), QtWaylandClient::QWaylandWindow::repositionFromApplyConfigure(), QtWaylandClient::QWaylandWindow::resizeFromApplyConfigure(), QWidgetPrivate::safeAreaMargins(), QHighDpi::scale(), QLayout::setContentsMargins(), QWidget::setContentsMargins(), QToolBarLayout::setGeometry(), QCocoaWindow::setGeometry(), QWindowsWindow::setGeometry(), QtWaylandClient::QWaylandWindow::setGeometryFromApplyConfigure(), QWindowsWindow::setMask(), QOffscreenWindow::setWindowState(), QAndroidStyle::AndroidControl::sizeFromContents(), QLineEdit::sizeHint(), QQC2::QCommonStyle::subElementRect(), QCommonStyle::subElementRect(), QAndroidStyle::AndroidControl::subElementRect(), QAndroidStyle::AndroidProgressBarControl::subElementRect(), QWaylandQtShellSurfacePrivate::updateFrameMargins(), QWidgetPrivate::updateFrameStrut(), QQuickStyleItem::updatePaintNode(), QtWaylandClient::QWaylandTextInputv1::updateState(), QtWaylandClient::QWaylandTextInputv2::updateState(), QtWaylandClient::QWaylandTextInputv3::updateState(), QtWaylandClient::QWaylandEglWindow::updateSurface(), and QtWaylandClient::QWaylandWindow::windowContentGeometry().

◆ operator*=() [1/2]

constexpr QMargins & QMargins::operator*= ( int factor)
inlineconstexprnoexcept

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

See also
operator/=()
Since
5.1

Definition at line 231 of file qmargins.h.

◆ operator*=() [2/2]

constexpr QMargins & QMargins::operator*= ( qreal factor)
inlineconstexprnoexcept

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies each component of this object by factor and returns a reference to it.

See also
operator/=()
Since
5.1

Definition at line 241 of file qmargins.h.

◆ operator+=() [1/2]

constexpr QMargins & QMargins::operator+= ( const QMargins & margins)
inlineconstexprnoexcept

Add each component of margins to the respective component of this object and returns a reference to it.

See also
operator-=()
Since
5.1

Definition at line 203 of file qmargins.h.

◆ operator+=() [2/2]

constexpr QMargins & QMargins::operator+= ( int addend)
inlineconstexprnoexcept

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Adds the addend to each component of this object and returns a reference to it.

See also
operator-=()

Definition at line 213 of file qmargins.h.

◆ operator-=() [1/2]

constexpr QMargins & QMargins::operator-= ( const QMargins & margins)
inlineconstexprnoexcept

Subtract each component of margins from the respective component of this object and returns a reference to it.

See also
operator+=()
Since
5.1

Definition at line 208 of file qmargins.h.

◆ operator-=() [2/2]

constexpr QMargins & QMargins::operator-= ( int subtrahend)
inlineconstexprnoexcept

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Subtracts the subtrahend from each component of this object and returns a reference to it.

See also
operator+=()

Definition at line 222 of file qmargins.h.

◆ operator/=() [1/2]

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

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

See also
operator*=()
Since
5.1

Definition at line 236 of file qmargins.h.

◆ operator/=() [2/2]

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
operator*=()
Since
5.1

Definition at line 246 of file qmargins.h.

◆ right()

constexpr int QMargins::right ( ) const
inlineconstexprnoexcept

Returns the right margin.

Definition at line 112 of file qmargins.h.

Referenced by QWindowCreationContext::QWindowCreationContext(), calcPosition(), QAndroidStyle::drawControl(), QWindowsGeometryHint::frameSizeConstraints(), QWindowsGeometryHint::handleCalculateSize(), QtWaylandClient::QWaylandShmBuffer::imageInsideMargins(), QtWaylandClient::marginsRegion(), QLineEdit::minimumSizeHint(), operator*(), operator*(), operator*(), operator*(), operator-(), QMarginsF::operator-(), operator/(), operator/(), QtWaylandClient::QWaylandAdwaitaDecoration::paint(), QSGTextMaskMaterial::populate(), QQuickTableViewPrivate::processRebuildTable(), QtWaylandClient::QWaylandShmBackingStore::recreateBackBufferIfNeeded(), QtWaylandClient::QWaylandWindow::resizeFromApplyConfigure(), QQuickStyleMargins::right(), QWidgetPrivate::safeAreaMargins(), QHighDpi::scale(), QLayout::setContentsMargins(), QWidget::setContentsMargins(), QToolBarLayout::setGeometry(), QtWaylandClient::QWaylandWindow::setGeometryFromApplyConfigure(), QOffscreenWindow::setWindowState(), QAndroidStyle::AndroidControl::sizeFromContents(), QLineEdit::sizeHint(), QQC2::QCommonStyle::subElementRect(), QCommonStyle::subElementRect(), QAndroidStyle::AndroidControl::subElementRect(), QAndroidStyle::AndroidProgressBarControl::subElementRect(), QWaylandQtShellSurfacePrivate::updateFrameMargins(), QWidgetPrivate::updateFrameStrut(), QQuickStyleItem::updatePaintNode(), and QtWaylandClient::QWaylandEglWindow::updateSurface().

+ Here is the caller graph for this function:

◆ setBottom()

constexpr void QMargins::setBottom ( int bottom)
inlineconstexprnoexcept

Sets the bottom margin to bottom.

Definition at line 128 of file qmargins.h.

Referenced by QQC2::QWindowsXPStyle::ninePatchMargins(), QSGDefaultGlyphNode::update(), and QQuickStyleItem::updatePaintNode().

+ Here is the caller graph for this function:

◆ setLeft()

constexpr void QMargins::setLeft ( int left)
inlineconstexprnoexcept

Sets the left margin to left.

Definition at line 119 of file qmargins.h.

Referenced by QAndroidStyle::AndroidDrawable::extractMargins(), QQC2::QWindowsXPStyle::ninePatchMargins(), and QQuickStyleItem::updatePaintNode().

+ Here is the caller graph for this function:

◆ setRight()

constexpr void QMargins::setRight ( int right)
inlineconstexprnoexcept

Sets the right margin to right.

Definition at line 125 of file qmargins.h.

Referenced by QQC2::QWindowsXPStyle::ninePatchMargins(), and QQuickStyleItem::updatePaintNode().

+ Here is the caller graph for this function:

◆ setTop()

constexpr void QMargins::setTop ( int top)
inlineconstexprnoexcept

Sets the Top margin to Top.

Definition at line 122 of file qmargins.h.

Referenced by QQC2::QWindowsXPStyle::ninePatchMargins(), QSGDefaultGlyphNode::update(), and QQuickStyleItem::updatePaintNode().

+ Here is the caller graph for this function:

◆ toMarginsF()

constexpr QMarginsF QMargins::toMarginsF ( ) const
inlineconstexprnoexcept
Since
6.4

Returns these margins as margins with floating point accuracy.

See also
QMarginsF::toMargins()

Definition at line 505 of file qmargins.h.

◆ top()

constexpr int QMargins::top ( ) const
inlineconstexprnoexcept

Returns the top margin.

See also
setTop()

Definition at line 109 of file qmargins.h.

Referenced by QWindowCreationContext::QWindowCreationContext(), QtWaylandClient::QWaylandShmBackingStore::beginPaint(), calcPosition(), QAndroidStyle::drawControl(), QWindowsBackingStore::flush(), QtWaylandClient::QWaylandShmBackingStore::flush(), QWindowsGeometryHint::frameSizeConstraints(), QWindowsGeometryHint::handleCalculateSize(), QWindowsWindow::handleNonClientHitTest(), QtWaylandClient::QWaylandShmBuffer::imageInsideMargins(), QToolBarLayout::layoutActions(), QtWaylandClient::QWaylandWindow::mapFromWlSurface(), QtWaylandClient::marginsRegion(), QLineEdit::minimumSizeHint(), operator*(), operator*(), operator*(), operator*(), operator-(), QMarginsF::operator-(), operator/(), operator/(), QSGTextMaskMaterial::populate(), QQuickTableViewPrivate::processRebuildTable(), QtWaylandClient::QWaylandShmBackingStore::recreateBackBufferIfNeeded(), QtWaylandClient::QWaylandWindow::repositionFromApplyConfigure(), QtWaylandClient::QWaylandWindow::resizeFromApplyConfigure(), QWidgetPrivate::safeAreaMargins(), QHighDpi::scale(), QLayout::setContentsMargins(), QWidget::setContentsMargins(), QToolBarLayout::setGeometry(), QCocoaWindow::setGeometry(), QWindowsWindow::setGeometry(), QtWaylandClient::QWaylandWindow::setGeometryFromApplyConfigure(), QWindowsWindow::setMask(), QOffscreenWindow::setWindowState(), QComboBox::showPopup(), QAndroidStyle::AndroidControl::sizeFromContents(), QLineEdit::sizeHint(), QQC2::QCommonStyle::subElementRect(), QCommonStyle::subElementRect(), QAndroidStyle::AndroidControl::subElementRect(), QAndroidStyle::AndroidProgressBarControl::subElementRect(), QQuickStyleMargins::top(), QWaylandQtShellSurfacePrivate::updateFrameMargins(), QWidgetPrivate::updateFrameStrut(), QQuickStyleItem::updatePaintNode(), QtWaylandClient::QWaylandTextInputv1::updateState(), QtWaylandClient::QWaylandTextInputv2::updateState(), QtWaylandClient::QWaylandTextInputv3::updateState(), QtWaylandClient::QWaylandEglWindow::updateSurface(), and QtWaylandClient::QWaylandWindow::windowContentGeometry().

Friends And Related Symbol Documentation

◆ comparesEqual

constexpr bool comparesEqual ( const QMargins & lhs,
const QMargins & rhs )
friend

Definition at line 58 of file qmargins.h.

◆ get

template<std::size_t I, typename M , std::enable_if_t<(I< 4), bool > = true, std::enable_if_t< std::is_same_v< q20::remove_cvref_t< M >, QMargins >, bool > = true>
constexpr decltype(auto) get ( M && m)
friend

Definition at line 71 of file qmargins.h.

◆ operator*() [1/4]

QMargins operator* ( const QMargins & margins,
int factor )
related

Returns a QMargins object that is formed by multiplying each component of the given margins by factor.

See also
QMargins::operator*=(), QMargins::operator/=()
Since
5.1

Definition at line 161 of file qmargins.h.

References bottom(), left(), right(), and top().

+ Here is the call graph for this function:

◆ operator*() [2/4]

QMargins operator* ( const QMargins & margins,
qreal factor )
related

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QMargins object that is formed by multiplying each component of the given margins by factor.

See also
QMargins::operator*=(), QMargins::operator/=()
Since
5.1

Definition at line 173 of file qmargins.h.

References bottom(), left(), qRound(), right(), and top().

+ Here is the call graph for this function:

◆ operator*() [3/4]

QMargins operator* ( int factor,
const QMargins & margins )
related

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QMargins object that is formed by multiplying each component of the given margins by factor.

See also
QMargins::operator*=(), QMargins::operator/=()
Since
5.1

Definition at line 167 of file qmargins.h.

References bottom(), left(), right(), and top().

+ Here is the call graph for this function:

◆ operator*() [4/4]

QMargins operator* ( qreal factor,
const QMargins & margins )
related

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QMargins object that is formed by multiplying each component of the given margins by factor.

See also
QMargins::operator*=(), QMargins::operator/=()
Since
5.1

Definition at line 179 of file qmargins.h.

References bottom(), left(), qRound(), right(), and top().

+ Here is the call graph for this function:

◆ operator+() [1/4]

QMargins operator+ ( const QMargins & lhs,
int rhs )
related

Returns a QMargins object that is formed by adding rhs to lhs.

See also
QMargins::operator+=(), QMargins::operator-=()
Since
5.3

Definition at line 143 of file qmargins.h.

◆ operator+() [2/4]

QMargins operator+ ( const QMargins & m1,
const QMargins & m2 )
related

Returns a QMargins object that is the sum of the given margins, m1 and m2; each component is added separately.

See also
QMargins::operator+=(), QMargins::operator-=()
Since
5.1

Definition at line 131 of file qmargins.h.

◆ operator+() [3/4]

QMargins operator+ ( const QMargins & margins)
related

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

Since
5.3

Definition at line 251 of file qmargins.h.

◆ operator+() [4/4]

QMargins operator+ ( int lhs,
const QMargins & rhs )
related

Returns a QMargins object that is formed by adding lhs to rhs.

See also
QMargins::operator+=(), QMargins::operator-=()
Since
5.3

Definition at line 149 of file qmargins.h.

◆ operator-() [1/3]

QMargins operator- ( const QMargins & lhs,
int rhs )
related

Returns a QMargins object that is formed by subtracting rhs from lhs.

See also
QMargins::operator+=(), QMargins::operator-=()
Since
5.3

Definition at line 155 of file qmargins.h.

◆ operator-() [2/3]

QMargins operator- ( const QMargins & m1,
const QMargins & m2 )
related

Returns a QMargins object that is formed by subtracting m2 from m1; each component is subtracted separately.

See also
QMargins::operator+=(), QMargins::operator-=()
Since
5.1

Definition at line 137 of file qmargins.h.

◆ operator-() [3/3]

QMargins operator- ( const QMargins & margins)
related

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

Since
5.1

Definition at line 256 of file qmargins.h.

References bottom(), left(), right(), and top().

+ Here is the call graph for this function:

◆ operator/() [1/2]

QMargins operator/ ( const QMargins & ,
qreal  )
related

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QMargins object that is formed by dividing the components of the given margins by the given divisor.

See also
QMargins::operator*=(), QMargins::operator/=()
Since
5.1

Definition at line 191 of file qmargins.h.

References bottom(), left(), qRound(), right(), and top().

+ Here is the call graph for this function:

◆ operator/() [2/2]

QMargins operator/ ( const QMargins & margins,
int divisor )
related

Returns a QMargins object that is formed by dividing the components of the given margins by the given divisor.

See also
QMargins::operator*=(), QMargins::operator/=()
Since
5.1

Definition at line 185 of file qmargins.h.

References bottom(), left(), right(), and top().

+ Here is the call graph for this function:

◆ operator<<()

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

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

See also
{Serializing Qt Data Types}

Definition at line 400 of file qmargins.cpp.

◆ operator>>()

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

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

See also
{Serializing Qt Data Types}

Definition at line 416 of file qmargins.cpp.

◆ operator|()

QMargins operator| ( const QMargins & m1,
const QMargins & m2 )
related

Returns a QMargins object that is formed from the maximum of each component of m2 and m1.

See also
QMargins::operator+=(), QMargins::operator-=()
Since
6.0

Definition at line 197 of file qmargins.h.

References qMax().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: