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
QLayout Class Referenceabstract

The QLayout class is the base class of geometry managers. More...

#include <qlayout.h>

+ Inheritance diagram for QLayout:
+ Collaboration diagram for QLayout:

Public Types

enum  SizeConstraint {
  SetDefaultConstraint , SetNoConstraint , SetMinimumSize , SetFixedSize ,
  SetMaximumSize , SetMinAndMaxSize
}
 The possible values are: More...
 

Public Member Functions

 QLayout (QWidget *parent=nullptr)
 Constructs a new top-level QLayout, with parent parent.
 
 ~QLayout ()
 
virtual int spacing () const
 
virtual void setSpacing (int)
 
void setContentsMargins (int left, int top, int right, int bottom)
 
void setContentsMargins (const QMargins &margins)
 
void unsetContentsMargins ()
 
void getContentsMargins (int *left, int *top, int *right, int *bottom) const
 
QMargins contentsMargins () const
 
QRect contentsRect () const
 
bool setAlignment (QWidget *w, Qt::Alignment alignment)
 Sets the alignment for widget w to alignment and returns true if w is found in this layout (not including child layouts); otherwise returns false.
 
bool setAlignment (QLayout *l, Qt::Alignment alignment)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the alignment for the layout l to alignment and returns true if l is found in this layout (not including child layouts); otherwise returns false.
 
void setSizeConstraint (SizeConstraint)
 
SizeConstraint sizeConstraint () const
 
void setMenuBar (QWidget *w)
 Tells the geometry manager to place the menu bar widget at the top of parentWidget(), outside QWidget::contentsMargins().
 
QWidgetmenuBar () const
 Returns the menu bar set for this layout, or \nullptr if no menu bar is set.
 
QWidgetparentWidget () const
 Returns the parent widget of this layout, or \nullptr if this layout is not installed on any widget.
 
void invalidate () override
 \reimp
 
QRect geometry () const override
 \reimp
 
bool activate ()
 Redoes the layout for parentWidget() if necessary.
 
void update ()
 Updates the layout for parentWidget().
 
void addWidget (QWidget *w)
 Adds widget w to this layout in a manner specific to the layout.
 
virtual void addItem (QLayoutItem *)=0
 Implemented in subclasses to add an item.
 
void removeWidget (QWidget *w)
 Removes the widget widget from the layout.
 
void removeItem (QLayoutItem *)
 Removes the layout item item from the layout.
 
Qt::Orientations expandingDirections () const override
 Returns whether this layout can make use of more space than sizeHint().
 
QSize minimumSize () const override
 Returns the minimum size of this layout.
 
QSize maximumSize () const override
 Returns the maximum size of this layout.
 
virtual void setGeometry (const QRect &) override
 \reimp
 
virtual QLayoutItemitemAt (int index) const =0
 Must be implemented in subclasses to return the layout item at index.
 
virtual QLayoutItemtakeAt (int index)=0
 Must be implemented in subclasses to remove the layout item at index from the layout, and return the item.
 
virtual int indexOf (const QWidget *) const
 Searches for widget widget in this layout (not including child layouts).
 
virtual int indexOf (const QLayoutItem *) const
 
virtual int count () const =0
 Must be implemented in subclasses to return the number of items in the layout.
 
bool isEmpty () const override
 \reimp
 
QSizePolicy::ControlTypes controlTypes () const override
 \reimp
 
virtual QLayoutItemreplaceWidget (QWidget *from, QWidget *to, Qt::FindChildOptions options=Qt::FindChildrenRecursively)
 
int totalMinimumHeightForWidth (int w) const
 
int totalHeightForWidth (int w) const
 
QSize totalMinimumSize () const
 
QSize totalMaximumSize () const
 
QSize totalSizeHint () const
 
QLayoutlayout () override
 \reimp
 
void setEnabled (bool)
 Enables this layout if enable is true, otherwise disables it.
 
bool isEnabled () const
 Returns true if the layout is enabled; otherwise returns false.
 
void setAlignment (Qt::Alignment a)
 Sets the alignment of this item to alignment.
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
void killTimer (Qt::TimerId id)
 
template<typename T >
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 
- Public Member Functions inherited from QLayoutItem
 QLayoutItem (Qt::Alignment alignment=Qt::Alignment())
 Constructs a layout item with an alignment.
 
virtual ~QLayoutItem ()
 Destroys the QLayoutItem.
 
virtual QSize sizeHint () const =0
 Implemented in subclasses to return the preferred size of this item.
 
virtual bool hasHeightForWidth () const
 Returns true if this layout's preferred height depends on its width; otherwise returns false.
 
virtual int heightForWidth (int) const
 Returns the preferred height for this layout item, given the width, which is not used in this default implementation.
 
virtual int minimumHeightForWidth (int) const
 Returns the minimum height this widget needs for the given width, w.
 
virtual QWidgetwidget () const
 If this item manages a QWidget, returns that widget.
 
virtual QSpacerItemspacerItem ()
 If this item is a QSpacerItem, it is returned as a QSpacerItem; otherwise \nullptr is returned.
 
Qt::Alignment alignment () const
 Returns the alignment of this item.
 
void setAlignment (Qt::Alignment a)
 Sets the alignment of this item to alignment.
 

Static Public Member Functions

static QSize closestAcceptableSize (const QWidget *w, const QSize &s)
 Returns a size that satisfies all size constraints on widget, including heightForWidth() and that is as close as possible to size.
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 

Protected Member Functions

void widgetEvent (QEvent *)
 
void childEvent (QChildEvent *e) override
 \reimp
 
void addChildLayout (QLayout *l)
 This function is called from addLayout() or insertLayout() functions in subclasses to add layout childLayout as a sub-layout.
 
void addChildWidget (QWidget *w)
 This function is called from addWidget() functions in subclasses to add w as a managed widget of a layout.
 
bool adoptLayout (QLayout *layout)
 
QRect alignmentRect (const QRect &) const
 Returns the rectangle that should be covered when the geometry of this layout is set to r, provided that this layout supports setAlignment().
 
 QLayout (QLayoutPrivate &d, QLayout *, QWidget *)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 

Properties

int spacing
 the spacing between widgets inside the layout
 
QMargins contentsMargins
 
SizeConstraint sizeConstraint
 the resize mode of the layout
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Friends

class QApplicationPrivate
 
class QWidget
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Protected Attributes inherited from QLayoutItem
Qt::Alignment align
 

Detailed Description

The QLayout class is the base class of geometry managers.

\inmodule QtWidgets

This is an abstract base class inherited by the concrete classes QBoxLayout, QGridLayout, QFormLayout, and QStackedLayout.

For users of QLayout subclasses or of QMainWindow there is seldom any need to use the basic functions provided by QLayout, such as setSizeConstraint() or setMenuBar(). See \l{Layout Management} for more information.

To make your own layout manager, implement the functions addItem(), sizeHint(), setGeometry(), itemAt() and takeAt(). You should also implement minimumSize() to ensure your layout isn't resized to zero size if there is too little space. To support children whose heights depend on their widths, implement hasHeightForWidth() and heightForWidth(). See the \l{layouts/flowlayout}{Flow Layout} example for more information about implementing custom layout managers.

Geometry management stops when the layout manager is deleted.

See also
QLayoutItem, {Layout Management}, {Basic Layouts Example}, {Flow Layout Example}

Definition at line 25 of file qlayout.h.

Member Enumeration Documentation

◆ SizeConstraint

The possible values are:

\value SetDefaultConstraint The main widget's minimum size is set to minimumSize(), unless the widget already has a minimum size.

\value SetFixedSize The main widget's size is set to sizeHint(); it cannot be resized at all. \value SetMinimumSize The main widget's minimum size is set to minimumSize(); it cannot be smaller.

\value SetMaximumSize The main widget's maximum size is set to maximumSize(); it cannot be larger.

\value SetMinAndMaxSize The main widget's minimum size is set to minimumSize() and its maximum size is set to maximumSize().

\value SetNoConstraint The widget is not constrained.

See also
setSizeConstraint()
Enumerator
SetDefaultConstraint 
SetNoConstraint 
SetMinimumSize 
SetFixedSize 
SetMaximumSize 
SetMinAndMaxSize 

Definition at line 35 of file qlayout.h.

Constructor & Destructor Documentation

◆ QLayout() [1/2]

QLayout::QLayout ( QWidget * parent = nullptr)
explicit

Constructs a new top-level QLayout, with parent parent.

The layout is set directly as the top-level layout for parent. There can be only one top-level layout for a widget. It is returned by QWidget::layout().

If parent is \nullptr, then you must insert this layout into another layout, or set it as a widget's layout using QWidget::setLayout().

See also
QWidget::setLayout()

Definition at line 83 of file qlayout.cpp.

◆ ~QLayout()

QLayout::~QLayout ( )

Destroys the layout, deleting all child layouts. Geometry management stops when a top-level layout is deleted.

The layout classes will probably be fatally confused if you delete a sublayout.

Definition at line 700 of file qlayout.cpp.

References d, QObject::isWidgetType(), QWidget::layout(), layout(), QObject::parent(), parentWidget(), and removeItem().

+ Here is the call graph for this function:

◆ QLayout() [2/2]

QLayout::QLayout ( QLayoutPrivate & dd,
QLayout * lay,
QWidget * w )
protected

Definition at line 93 of file qlayout.cpp.

References d, invalidate(), QObject::objectName, Q_UNLIKELY, QT_CATCH, QT_RETHROW, QT_TRY, qUtf16Printable, qWarning, and QObject::setParent().

+ Here is the call graph for this function:

Member Function Documentation

◆ activate()

bool QLayout::activate ( )

Redoes the layout for parentWidget() if necessary.

You should generally not need to call this because it is automatically called at the most appropriate times. It returns true if the layout was redone.

See also
update(), QWidget::updateGeometry()

Definition at line 995 of file qlayout.cpp.

References activate(), className, d, QWidgetPrivate::extra, Qt::Horizontal, metaObject(), QObject::objectName, QObject::parent(), Q_UNLIKELY, qUtf16Printable, qWarning, SetDefaultConstraint, SetFixedSize, QSize::setHeight(), SetMaximumSize, SetMinAndMaxSize, SetMinimumSize, SetNoConstraint, QSize::setWidth(), totalMaximumSize(), totalMinimumSize(), totalSizeHint(), and Qt::Vertical.

Referenced by activate(), QMessageBoxPrivate::layoutMinimumWidth(), QWidgetPrivate::prepareToRender(), QWidgetPrivate::setVisible(), QWidgetPrivate::show_recursive(), QComboBox::showPopup(), QMessageBoxPrivate::updateSize(), and widgetEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addChildLayout()

void QLayout::addChildLayout ( QLayout * childLayout)
protected

This function is called from addLayout() or insertLayout() functions in subclasses to add layout childLayout as a sub-layout.

The only scenario in which you need to call it directly is if you implement a custom layout that supports nested layouts.

See also
QBoxLayout::addLayout(), QBoxLayout::insertLayout(), QGridLayout::addLayout()

Definition at line 719 of file qlayout.cpp.

References parentWidget(), Q_UNLIKELY, qUtf16Printable, and qWarning.

Referenced by adoptLayout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addChildWidget()

void QLayout::addChildWidget ( QWidget * w)
protected

This function is called from addWidget() functions in subclasses to add w as a managed widget of a layout.

If w is already managed by a layout, this function will produce a warning, and remove w from that layout. This function must therefore be called before adding w to the layout's data structure.

Definition at line 837 of file qlayout.cpp.

References QWidgetPrivate::get(), QMetaObject::invokeMethod(), layout(), parentWidget(), QWidget::parentWidget(), Q_UNLIKELY, Qt::QueuedConnection, qUtf16Printable, qWarning, removeWidgetRecursively(), and Qt::WA_LaidOut.

Referenced by QGridLayout::addWidget(), QGridLayout::addWidget(), addWidget(), QStackedLayout::insertWidget(), QBoxLayout::insertWidget(), replaceWidget(), QMainWindowLayout::setCentralWidget(), setMenuBar(), and QDockWidgetLayout::setWidgetForRole().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addItem()

void QLayout::addItem ( QLayoutItem * item)
pure virtual

Implemented in subclasses to add an item.

How it is added is specific to each subclass.

This function is not usually called in application code. To add a widget to a layout, use the addWidget() function; to add a child layout, use the addLayout() function provided by the relevant QLayout subclass.

{Note:} The ownership of item is transferred to the layout, and it's the layout's responsibility to delete it.

See also
addWidget(), QBoxLayout::addLayout(), QGridLayout::addLayout()

Implemented in QBoxLayout, QGridLayout, CardLayout, QFormLayout, QStackedLayout, QDockWidgetLayout, QMainWindowLayout, and QToolBarLayout.

Referenced by addWidget().

+ Here is the caller graph for this function:

◆ addWidget()

void QLayout::addWidget ( QWidget * w)

Adds widget w to this layout in a manner specific to the layout.

This function uses addItem().

Definition at line 186 of file qlayout.cpp.

References addChildWidget(), addItem(), and QLayoutPrivate::createWidgetItem().

Referenced by DragWidget::DragWidget(), FinalWidget::FinalWidget(), QComboBoxPrivateContainer::QComboBoxPrivateContainer(), Window::Window(), dropevents::Window::Window(), QGridLayout::addWidget(), QPrintPreviewWidgetPrivate::init(), QKeySequenceEditPrivate::init(), and QMdiSubWindow::setWidget().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ adoptLayout()

bool QLayout::adoptLayout ( QLayout * layout)
protected

Definition at line 737 of file qlayout.cpp.

References addChildLayout(), layout(), ok, and QObject::parent().

Referenced by QGridLayout::addLayout(), QGridLayout::addLayout(), and QBoxLayout::insertLayout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ alignmentRect()

QRect QLayout::alignmentRect ( const QRect & r) const
protected

Returns the rectangle that should be covered when the geometry of this layout is set to r, provided that this layout supports setAlignment().

The result is derived from sizeHint() and expandingDirections(). It is never larger than r.

Definition at line 1265 of file qlayout.cpp.

References Qt::AlignBottom, Qt::AlignHorizontal_Mask, Qt::AlignLeft, QLayoutItem::alignment(), Qt::AlignRight, Qt::AlignTop, Qt::AlignVertical_Mask, expandingDirections(), QLayoutItem::hasHeightForWidth(), QSize::height(), QLayoutItem::heightForWidth(), Qt::Horizontal, QGuiApplication::layoutDirection, QObject::parent(), parentWidget(), qMin(), setAlignment(), QSize::setWidth(), QLayoutItem::sizeHint(), Qt::Vertical, QStyle::visualAlignment(), and QSize::width().

Referenced by QBoxLayout::setGeometry(), and QGridLayout::setGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ childEvent()

void QLayout::childEvent ( QChildEvent * e)
overrideprotectedvirtual

\reimp

Reimplemented from QObject.

Definition at line 560 of file qlayout.cpp.

References QChildEvent::child(), QEvent::ChildRemoved, d, removeItem(), and QEvent::type().

+ Here is the call graph for this function:

◆ closestAcceptableSize()

QSize QLayout::closestAcceptableSize ( const QWidget * w,
const QSize & s )
static

Returns a size that satisfies all size constraints on widget, including heightForWidth() and that is as close as possible to size.

Definition at line 1398 of file qlayout.cpp.

References QSize::boundedTo(), QLayoutItem::hasHeightForWidth(), QSize::height(), QLayoutItem::minimumHeightForWidth(), qMax(), qMin(), qSmartMaxSize(), qSmartMinSize(), QLayoutItem::widget(), and QSize::width().

Referenced by QWidgetWindowPrivate::closestAcceptableGeometry(), and QSizeGrip::mouseMoveEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ contentsMargins()

QMargins QLayout::contentsMargins ( ) const
Since
4.6

Returns the margins used around the layout.

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

See also
setContentsMargins()

Definition at line 366 of file qlayout.cpp.

References getContentsMargins().

+ Here is the call graph for this function:

◆ contentsRect()

QRect QLayout::contentsRect ( ) const
Since
4.3

Returns the layout's geometry() rectangle, but taking into account the contents margins.

See also
setContentsMargins(), getContentsMargins()

Definition at line 381 of file qlayout.cpp.

References d, and getContentsMargins().

+ Here is the call graph for this function:

◆ controlTypes()

QSizePolicy::ControlTypes QLayout::controlTypes ( ) const
overridevirtual

\reimp

Reimplemented from QLayoutItem.

Definition at line 438 of file qlayout.cpp.

References count(), QSizePolicy::DefaultType, i, and itemAt().

+ Here is the call graph for this function:

◆ count()

int * QLayout::count ( ) const
pure virtual

Must be implemented in subclasses to return the number of items in the layout.

See also
itemAt()

Implemented in CardLayout, QBoxLayout, QFormLayout, QGridLayout, QStackedLayout, QDockWidgetLayout, QMainWindowLayout, and QToolBarLayout.

Referenced by controlTypes(), indexOf(), indexOf(), and replaceWidget().

+ Here is the caller graph for this function:

◆ expandingDirections()

Qt::Orientations QLayout::expandingDirections ( ) const
overridevirtual

Returns whether this layout can make use of more space than sizeHint().

A value of Qt::Vertical or Qt::Horizontal means that it wants to grow in only one dimension, whereas Qt::Vertical | Qt::Horizontal means that it wants to grow in both dimensions.

The default implementation returns Qt::Horizontal | Qt::Vertical. Subclasses reimplement it to return a meaningful value based on their child widgets's \l{QSizePolicy}{size policies}.

See also
sizeHint()

Implements QLayoutItem.

Reimplemented in QToolBarLayout.

Definition at line 944 of file qlayout.cpp.

References Qt::Horizontal, and Qt::Vertical.

Referenced by QWidgetPrivate::adjustedSize(), alignmentRect(), and QWidgetItem::expandingDirections().

+ Here is the caller graph for this function:

◆ geometry()

QRect QLayout::geometry ( ) const
overridevirtual

\reimp

Implements QLayoutItem.

Definition at line 460 of file qlayout.cpp.

References d.

Referenced by QWidgetPrivate::safeAreaMargins(), QBoxLayout::setGeometry(), QGridLayout::setGeometry(), QDockWidgetLayout::setGeometry(), QFormLayout::setGeometry(), QStackedLayout::setStackingMode(), and QToolBarLayout::updateMacBorderMetrics().

+ Here is the caller graph for this function:

◆ getContentsMargins()

void QLayout::getContentsMargins ( int * left,
int * top,
int * right,
int * bottom ) const
Since
4.3

For each of left, top, right and bottom that is not \nullptr, stores the size of the margin named in the location the pointer refers to.

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

See also
setContentsMargins(), QStyle::pixelMetric(), {QStyle::}{PM_LayoutLeftMargin}, {QStyle::}{PM_LayoutTopMargin}, {QStyle::}{PM_LayoutRightMargin}, {QStyle::}{PM_LayoutBottomMargin}

Definition at line 347 of file qlayout.cpp.

References d, QStyle::PM_LayoutBottomMargin, QStyle::PM_LayoutLeftMargin, QStyle::PM_LayoutRightMargin, and QStyle::PM_LayoutTopMargin.

Referenced by contentsMargins(), contentsRect(), QFormLayout::heightForWidth(), and QFormLayout::setGeometry().

+ Here is the caller graph for this function:

◆ indexOf() [1/2]

int QLayout::indexOf ( const QLayoutItem * layoutItem) const
virtual
Since
5.12 Searches for layout item layoutItem in this layout (not including child layouts).

Returns the index of layoutItem, or -1 if layoutItem is not found.

Reimplemented in QToolBarLayout.

Definition at line 1196 of file qlayout.cpp.

References count(), i, itemAt(), and layoutItem().

+ Here is the call graph for this function:

◆ indexOf() [2/2]

int QLayout::indexOf ( const QWidget * widget) const
virtual

Searches for widget widget in this layout (not including child layouts).

Returns the index of widget, or -1 if widget is not found.

The default implementation iterates over all items using itemAt().

Reimplemented in QToolBarLayout.

Definition at line 1177 of file qlayout.cpp.

References count(), i, itemAt(), and QLayoutItem::widget().

Referenced by QFormLayout::getWidgetPosition(), QWidgetPrivate::safeAreaMargins(), QStackedLayout::setCurrentWidget(), QToolBarLayout::setExpanded(), and QWizardPrivate::updateLayout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ invalidate()

void QLayout::invalidate ( )
overridevirtual

\reimp

Reimplemented from QLayoutItem.

Reimplemented in QMainWindowLayout, and QToolBarLayout.

Definition at line 469 of file qlayout.cpp.

References d, and update().

Referenced by QLayout(), QStackedLayout::insertWidget(), QBoxLayout::invalidate(), QFormLayout::invalidate(), QGridLayout::invalidate(), QMainWindowLayout::invalidate(), QToolBarLayout::invalidate(), QWidgetPrivate::prepareToRender(), removeItem(), removeWidget(), setAlignment(), setAlignment(), setContentsMargins(), QWidget::setLayout(), setSizeConstraint(), setSpacing(), QDockWidgetLayout::setVerticalTitleBar(), QDockWidgetLayout::setWidgetForRole(), QDockWidgetLayout::takeAt(), and QDockWidgetPrivate::updateButtons().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isEmpty()

bool QLayout::isEmpty ( ) const
overridevirtual

\reimp

Implements QLayoutItem.

Reimplemented in QToolBarLayout.

Definition at line 422 of file qlayout.cpp.

References i, item, and itemAt().

Referenced by QWidgetTextControlPrivate::isPreediting(), and QPlainTextEdit::paintEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isEnabled()

bool QLayout::isEnabled ( ) const

Returns true if the layout is enabled; otherwise returns false.

See also
setEnabled()

Definition at line 1386 of file qlayout.cpp.

References d.

◆ itemAt()

QLayoutItem * QLayout::itemAt ( int index) const
pure virtual

Must be implemented in subclasses to return the layout item at index.

If there is no such item, the function must return \nullptr. Items are numbered consecutively from 0. If an item is deleted, other items will be renumbered.

This function can be used to iterate over a layout. The following code will draw a rectangle for each layout item in the layout structure of the widget.

{
QLayout *layout = item->layout();
if (layout) {
for (int i = 0; i < layout->count(); ++i)
}
painter->drawRect(item->geometry());
}
{
if (layout())
}
See also
count(), takeAt()

Implemented in QFormLayout, QGridLayout, QDockWidgetLayout, QMainWindowLayout, QToolBarLayout, CardLayout, QBoxLayout, and QStackedLayout.

Referenced by controlTypes(), indexOf(), indexOf(), isEmpty(), removeItem(), removeWidget(), replaceWidget(), setAlignment(), setAlignment(), and QToolBar::setIconSize().

+ Here is the caller graph for this function:

◆ layout()

◆ maximumSize()

QSize QLayout::maximumSize ( ) const
overridevirtual

Returns the maximum size of this layout.

This is the largest size that the layout can have while still respecting the specifications.

The returned value doesn't include the space required by QWidget::setContentsMargins() or menuBar().

The default implementation allows unlimited resizing.

Implements QLayoutItem.

Definition at line 927 of file qlayout.cpp.

References QLAYOUTSIZE_MAX.

Referenced by QToolBarLayout::layoutActions(), and totalMaximumSize().

+ Here is the caller graph for this function:

◆ menuBar()

QWidget * QLayout::menuBar ( ) const

Returns the menu bar set for this layout, or \nullptr if no menu bar is set.

Definition at line 895 of file qlayout.cpp.

References d.

◆ minimumSize()

QSize QLayout::minimumSize ( ) const
overridevirtual

Returns the minimum size of this layout.

This is the smallest size that the layout can have while still respecting the specifications.

The returned value doesn't include the space required by QWidget::setContentsMargins() or menuBar().

The default implementation allows unlimited resizing.

Implements QLayoutItem.

Reimplemented in QStackedLayout, QMainWindowLayout, and QToolBarLayout.

Definition at line 912 of file qlayout.cpp.

Referenced by QMdiSubWindow::minimumSizeHint(), and totalMinimumSize().

+ Here is the caller graph for this function:

◆ parentWidget()

QWidget * QLayout::parentWidget ( ) const

Returns the parent widget of this layout, or \nullptr if this layout is not installed on any widget.

If the layout is a sub-layout, this function returns the parent widget of the parent layout.

See also
parent()

Definition at line 399 of file qlayout.cpp.

References d, QObject::isWidgetType(), QObject::parent(), parentWidget(), Q_ASSERT, Q_UNLIKELY, and qWarning.

Referenced by ~QLayout(), addChildLayout(), addChildWidget(), alignmentRect(), QMainWindowLayout::applyState(), QToolBarLayout::expandedSize(), QToolBarLayout::expandingDirections(), QMainWindowLayout::hover(), QToolBarLayout::layoutActions(), QDockWidgetLayout::maximumSize(), QDockWidgetLayout::minimumSize(), QDockWidgetLayout::minimumTitleWidth(), QToolBarLayout::movable(), QDockWidgetLayout::nativeWindowDeco(), parentWidget(), QMainWindowLayout::restoreState(), QWidgetPrivate::safeAreaMargins(), QStackedLayout::setCurrentIndex(), QToolBarLayout::setExpanded(), QBoxLayout::setGeometry(), QDockWidgetLayout::setGeometry(), QToolBarLayout::setGeometry(), QDockWidgetLayout::setVerticalTitleBar(), QDockWidgetLayout::sizeFromContent(), QDockWidgetLayout::sizeHint(), QDockWidgetLayout::titleHeight(), totalHeightForWidth(), totalMaximumSize(), totalMinimumHeightForWidth(), totalMinimumSize(), totalSizeHint(), QToolBarLayout::updateMacBorderMetrics(), and QToolBarLayout::updateMarginAndSpacing().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeItem()

void QLayout::removeItem ( QLayoutItem * item)

Removes the layout item item from the layout.

It is the caller's responsibility to delete the item.

Notice that item can be a layout (since QLayout inherits QLayoutItem).

See also
removeWidget(), addItem()

Definition at line 1351 of file qlayout.cpp.

References child, i, invalidate(), item, itemAt(), and takeAt().

Referenced by ~QLayout(), and childEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeWidget()

void QLayout::removeWidget ( QWidget * widget)

Removes the widget widget from the layout.

After this call, it is the caller's responsibility to give the widget a reasonable geometry or to put the widget back into a layout or to explicitly hide it if necessary.

{Note:} The ownership of widget remains the same as when it was added.

See also
removeItem(), QWidget::setGeometry(), addWidget()

Definition at line 1323 of file qlayout.cpp.

References child, i, invalidate(), itemAt(), Q_UNLIKELY, qWarning, takeAt(), and QLayoutItem::widget().

Referenced by QToolBoxPrivate::_q_widgetDestroyed(), QMdiSubWindowPrivate::removeBaseWidget(), QMessageBox::setCheckBox(), QInputDialogPrivate::setInputWidget(), QWatermarkLabel::setSideWidget(), and QDockWidgetLayout::setWidgetForRole().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replaceWidget()

QLayoutItem * QLayout::replaceWidget ( QWidget * from,
QWidget * to,
Qt::FindChildOptions options = Qt::FindChildrenRecursively )
virtual
Since
5.2

Searches for widget from and replaces it with widget to if found. Returns the layout item that contains the widget from on success. Otherwise \nullptr is returned. If options contains Qt::FindChildrenRecursively (the default), sub-layouts are searched for doing the replacement. Any other flag in options is ignored.

Notice that the returned item therefore might not belong to this layout, but to a sub-layout.

The returned layout item is no longer owned by the layout and should be either deleted or inserted to another layout. The widget from is no longer managed by the layout and may need to be deleted or hidden. The parent of widget from is left unchanged.

This function works for the built-in Qt layouts, but might not work for custom layouts.

See also
indexOf()

Definition at line 1090 of file qlayout.cpp.

References addChildWidget(), count(), d, Qt::FindChildrenRecursively, item, and itemAt().

+ Here is the call graph for this function:

◆ setAlignment() [1/3]

bool QLayout::setAlignment ( QLayout * l,
Qt::Alignment alignment )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the alignment for the layout l to alignment and returns true if l is found in this layout (not including child layouts); otherwise returns false.

Definition at line 222 of file qlayout.cpp.

References QLayoutItem::alignment(), i, invalidate(), item, and itemAt().

+ Here is the call graph for this function:

◆ setAlignment() [2/3]

void QLayoutItem::setAlignment ( Qt::Alignment alignment)

Sets the alignment of this item to alignment.

{Note:} Item alignment is only supported by QLayoutItem subclasses where it would have a visual effect. Except for QSpacerItem, which provides blank space for layouts, all public Qt classes that inherit QLayoutItem support item alignment.

Definition at line 46 of file qlayoutitem.cpp.

◆ setAlignment() [3/3]

bool QLayout::setAlignment ( QWidget * w,
Qt::Alignment alignment )

Sets the alignment for widget w to alignment and returns true if w is found in this layout (not including child layouts); otherwise returns false.

Definition at line 199 of file qlayout.cpp.

References QLayoutItem::alignment(), i, invalidate(), item, and itemAt().

Referenced by alignmentRect(), and QQuickLayoutAttached::setAlignment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContentsMargins() [1/2]

void QLayout::setContentsMargins ( const QMargins & margins)
Since
4.6

Sets the margins to use around the layout.

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

See also
contentsMargins()

Definition at line 313 of file qlayout.cpp.

References QMargins::bottom(), QMargins::left(), QMargins::right(), setContentsMargins(), and QMargins::top().

+ Here is the call graph for this function:

◆ setContentsMargins() [2/2]

void QLayout::setContentsMargins ( int left,
int top,
int right,
int bottom )
Since
4.3

Sets the left, top, right, and bottom margins to use around the layout.

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

See also
getContentsMargins(), QStyle::pixelMetric(), {QStyle::}{PM_LayoutLeftMargin}, {QStyle::}{PM_LayoutTopMargin}, {QStyle::}{PM_LayoutRightMargin}, {QStyle::}{PM_LayoutBottomMargin}

Definition at line 288 of file qlayout.cpp.

References d, and invalidate().

Referenced by QtPrivate::QColorShower::QColorShower(), QComboBoxPrivateContainer::QComboBoxPrivateContainer(), QWizardHeader::QWizardHeader(), QCalendarWidgetPrivate::createNavigationBar(), QPrintPreviewWidgetPrivate::init(), QKeySequenceEditPrivate::init(), QPrintPreviewDialogPrivate::init(), QDialogButtonBoxPrivate::initLayout(), QWizardPrivate::recreateLayout(), QToolBoxPrivate::relayout(), setContentsMargins(), QMessageBoxPrivate::setupLayout(), unsetContentsMargins(), and QToolBarLayout::updateMarginAndSpacing().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEnabled()

void QLayout::setEnabled ( bool enable)

Enables this layout if enable is true, otherwise disables it.

An enabled layout adjusts dynamically to changes; a disabled layout acts as if it did not exist.

By default all layouts are enabled.

See also
isEnabled()

Definition at line 1375 of file qlayout.cpp.

References d.

◆ setGeometry()

void QLayout::setGeometry ( const QRect & r)
overridevirtual

\reimp

Implements QLayoutItem.

Reimplemented in QBoxLayout, QGridLayout, QDockWidgetLayout, QMainWindowLayout, QToolBarLayout, CardLayout, QFormLayout, and QStackedLayout.

Definition at line 451 of file qlayout.cpp.

References d.

Referenced by QBoxLayout::setGeometry(), QGridLayout::setGeometry(), QMainWindowLayout::setGeometry(), QToolBarLayout::setGeometry(), CardLayout::setGeometry(), and QFormLayout::setGeometry().

+ Here is the caller graph for this function:

◆ setMenuBar()

void QLayout::setMenuBar ( QWidget * widget)

Tells the geometry manager to place the menu bar widget at the top of parentWidget(), outside QWidget::contentsMargins().

All child widgets are placed below the bottom edge of the menu bar.

Definition at line 882 of file qlayout.cpp.

References addChildWidget(), d, and QLayoutItem::widget().

+ Here is the call graph for this function:

◆ setSizeConstraint()

void QLayout::setSizeConstraint ( SizeConstraint constraint)

Definition at line 1241 of file qlayout.cpp.

References d, and invalidate().

Referenced by QInputDialogPrivate::ensureLayout(), extension(), QWizardPrivate::init(), QDockWidgetPrivate::init(), and QMessageBoxPrivate::setupLayout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSpacing()

void QLayout::setSpacing ( int spacing)
virtual

Reimplemented in QBoxLayout, QGridLayout, and QFormLayout.

Definition at line 266 of file qlayout.cpp.

References d, invalidate(), and spacing.

Referenced by CardLayout::CardLayout(), CardLayout::CardLayout(), QComboBoxPrivateContainer::QComboBoxPrivateContainer(), and QToolBarLayout::updateMarginAndSpacing().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sizeConstraint()

QLayout::SizeConstraint QLayout::sizeConstraint ( ) const

Definition at line 1251 of file qlayout.cpp.

References d.

◆ spacing()

int QLayout::spacing ( ) const
virtual

Reimplemented in QBoxLayout, QFormLayout, and QGridLayout.

Definition at line 255 of file qlayout.cpp.

References d, QStyle::PM_LayoutHorizontalSpacing, and qSmartSpacing().

+ Here is the call graph for this function:

◆ takeAt()

QLayoutItem * QLayout::takeAt ( int index)
pure virtual

Must be implemented in subclasses to remove the layout item at index from the layout, and return the item.

If there is no such item, the function must do nothing and return 0. Items are numbered consecutively from 0. If an item is removed, other items will be renumbered.

The following code fragment shows a safe way to remove all items from a layout:

while ((child = layout->takeAt(0)) != nullptr) {
...
delete child->widget(); // delete the widget
delete child; // delete the layout item
}
int count() const override
\reimp
QLayoutItem * takeAt(int) override
\reimp
QLayoutItem * itemAt(int) const override
\reimp
The QLayoutItem class provides an abstract item that a QLayout manipulates.
Definition qlayoutitem.h:25
virtual QWidget * widget() const
If this item manages a QWidget, returns that widget.
The QLayout class is the base class of geometry managers.
Definition qlayout.h:26
void drawRect(const QRectF &rect)
Draws the current rectangle with the current pen and brush.
Definition qpainter.h:519
QLayout * layout() const
Returns the layout manager that is installed on this widget, or \nullptr if no layout manager is inst...
QGraphicsItem * item
QLayoutItem * child
[0]
static void paintLayout(QPainter *painter, QLayoutItem *item)
[0]
QPainter painter(this)
[7]
See also
itemAt(), count()

Implemented in QFormLayout, QGridLayout, QDockWidgetLayout, QMainWindowLayout, QToolBarLayout, CardLayout, QBoxLayout, and QStackedLayout.

Referenced by removeItem(), and removeWidget().

+ Here is the caller graph for this function:

◆ totalHeightForWidth()

int QLayout::totalHeightForWidth ( int w) const

Also takes contentsMargins and menu bar into account.

Definition at line 599 of file qlayout.cpp.

References QWidgetPrivate::bottommargin, d, QLayoutItem::heightForWidth(), QWidgetPrivate::leftmargin, menuBarHeightForWidth(), QObject::parent(), parentWidget(), QWidgetPrivate::rightmargin, and QWidgetPrivate::topmargin.

Referenced by QWidgetPrivate::adjustedSize(), QWidget::heightForWidth(), QWidgetItem::heightForWidth(), and QMessageBoxPrivate::updateSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ totalMaximumSize()

QSize QLayout::totalMaximumSize ( ) const

Also takes contentsMargins and menu bar into account.

Definition at line 669 of file qlayout.cpp.

References QWidgetPrivate::bottommargin, d, QWidgetPrivate::leftmargin, maximumSize(), menuBarHeightForWidth(), parentWidget(), QLAYOUTSIZE_MAX, qMin(), QWidgetPrivate::rightmargin, and QWidgetPrivate::topmargin.

Referenced by activate(), and QWizardPrivate::updateMinMaxSizes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ totalMinimumHeightForWidth()

int QLayout::totalMinimumHeightForWidth ( int w) const

Also takes contentsMargins and menu bar into account.

Definition at line 577 of file qlayout.cpp.

References QWidgetPrivate::bottommargin, d, QWidgetPrivate::leftmargin, menuBarHeightForWidth(), QLayoutItem::minimumHeightForWidth(), QObject::parent(), parentWidget(), QWidgetPrivate::rightmargin, and QWidgetPrivate::topmargin.

Referenced by QWidgetItem::minimumHeightForWidth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ totalMinimumSize()

QSize QLayout::totalMinimumSize ( ) const

Also takes contentsMargins and menu bar into account.

Definition at line 621 of file qlayout.cpp.

References QWidgetPrivate::bottommargin, d, QWidgetPrivate::leftmargin, menuBarHeightForWidth(), minimumSize(), parentWidget(), QWidgetPrivate::rightmargin, and QWidgetPrivate::topmargin.

Referenced by activate(), QMessageBoxPrivate::layoutMinimumWidth(), QWizardHeader::setup(), QWizardPrivate::updateMinMaxSizes(), and QMessageBoxPrivate::updateSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ totalSizeHint()

QSize QLayout::totalSizeHint ( ) const

Also takes contentsMargins and menu bar into account.

Definition at line 644 of file qlayout.cpp.

References QWidgetPrivate::bottommargin, d, QLayoutItem::hasHeightForWidth(), QLayoutItem::heightForWidth(), QWidgetPrivate::leftmargin, menuBarHeightForWidth(), parentWidget(), QWidgetPrivate::rightmargin, QLayoutItem::sizeHint(), and QWidgetPrivate::topmargin.

Referenced by activate(), and QWizardPrivate::updateMinMaxSizes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unsetContentsMargins()

void QLayout::unsetContentsMargins ( )
Since
6.1

Unsets any user-defined margins around the layout. The layout will use the default values provided by the style.

See also
setContentsMargins()

Definition at line 326 of file qlayout.cpp.

References setContentsMargins().

+ Here is the call graph for this function:

◆ update()

void QLayout::update ( )

Updates the layout for parentWidget().

You should generally not need to call this because it is automatically called at the most appropriate times.

See also
activate(), invalidate()

Definition at line 971 of file qlayout.cpp.

References QObject::isWidgetType(), layout(), QEvent::LayoutRequest, QObject::parent(), QCoreApplication::postEvent(), and Q_ASSERT.

Referenced by invalidate(), QVideoFrame::paint(), and QWidgetPrivate::updateContentsRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ widgetEvent()

void QLayout::widgetEvent ( QEvent * e)
protected

Performs child widget layout when the parent widget is resized. Also handles removal of widgets. e is the event

Definition at line 520 of file qlayout.cpp.

References activate(), child, QEvent::ChildRemoved, d, QObjectPrivate::get(), isVisible(), QEvent::LayoutRequest, QObject::parent(), removeWidgetRecursively(), QEvent::Resize, QEvent::type(), and QObjectData::wasWidget.

Referenced by QApplicationPrivate::notify_helper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QApplicationPrivate

friend class QApplicationPrivate
friend

Definition at line 124 of file qlayout.h.

◆ QWidget

friend class QWidget
friend

Definition at line 125 of file qlayout.h.

Property Documentation

◆ contentsMargins

QMargins QLayout::contentsMargins
readwrite

◆ sizeConstraint

QLayout::sizeConstraint
readwrite

the resize mode of the layout

The default mode is \l {QLayout::SetDefaultConstraint} {SetDefaultConstraint}.

Definition at line 33 of file qlayout.h.

◆ spacing

QLayout::spacing
readwrite

the spacing between widgets inside the layout

If no value is explicitly set, the layout's spacing is inherited from the parent layout, or from the style settings for the parent widget.

For QGridLayout and QFormLayout, it is possible to set different horizontal and vertical spacings using \l{QGridLayout::}{setHorizontalSpacing()} and \l{QGridLayout::}{setVerticalSpacing()}. In that case, spacing() returns -1.

See also
contentsRect(), getContentsMargins(), QStyle::layoutSpacing(), QStyle::pixelMetric()

Definition at line 30 of file qlayout.h.

Referenced by CardLayout::CardLayout(), CardLayout::CardLayout(), QToolBarLayout::expandedSize(), QToolBarLayout::layoutActions(), CardLayout::minimumSize(), CardLayout::setGeometry(), setSpacing(), and CardLayout::sizeHint().


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