<class name="QLayout" doc="/**
&lt;p&gt;The &lt;a href=&quot;QLayout.html#QLayout()&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt; class is the base class of geometry managers.&lt;/p&gt;
&lt;p&gt;This is an abstract base class inherited by the concrete classes &lt;a href=&quot;QBoxLayout.html&quot;&gt;&lt;tt&gt;QBoxLayout&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QGridLayout.html&quot;&gt;&lt;tt&gt;QGridLayout&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QStackedLayout.html&quot;&gt;&lt;tt&gt;QStackedLayout&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For users of &lt;a href=&quot;QLayout.html#QLayout()&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt; subclasses or of &lt;a href=&quot;QMainWindow.html&quot;&gt;&lt;tt&gt;QMainWindow&lt;/tt&gt;&lt;/a&gt; there is seldom any need to use the basic functions provided by &lt;a href=&quot;QLayout.html#QLayout()&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt;, such as &lt;a href=&quot;QLayout.html#setSizeConstraint(com.trolltech.qt.gui.QLayout.SizeConstraint)&quot;&gt;&lt;tt&gt;setSizeConstraint&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QLayout.html#setMenuBar(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;setMenuBar&lt;/tt&gt;&lt;/a&gt;. See &lt;a href=&quot;%2E%2E/layout.html&quot;&gt;Layout Classes&lt;/tt&gt;&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;To make your own layout manager, implement the functions &lt;a href=&quot;QLayout.html#addItem(com.trolltech.qt.gui.QLayoutItemInterface)&quot;&gt;&lt;tt&gt;addItem&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QLayout.html#sizeHint()&quot;&gt;&lt;tt&gt;sizeHint&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QLayout.html#setGeometry(com.trolltech.qt.core.QRect)&quot;&gt;&lt;tt&gt;setGeometry&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QLayout.html#itemAt(int)&quot;&gt;&lt;tt&gt;itemAt&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QLayout.html#takeAt(int)&quot;&gt;&lt;tt&gt;takeAt&lt;/tt&gt;&lt;/a&gt;. You should also implement &lt;a href=&quot;QLayout.html#minimumSize()&quot;&gt;&lt;tt&gt;minimumSize&lt;/tt&gt;&lt;/a&gt; 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 &lt;a href=&quot;QLayout.html#hasHeightForWidth()&quot;&gt;&lt;tt&gt;hasHeightForWidth&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QLayout.html#heightForWidth(int)&quot;&gt;&lt;tt&gt;heightForWidth&lt;/tt&gt;&lt;/a&gt;. See the Border Layout&lt;/tt&gt; and Flow Layout&lt;/tt&gt; examples for more information about implementing custom layout managers.&lt;/p&gt;
&lt;p&gt;Geometry management stops when the layout manager is deleted.&lt;/p&gt;

@see &lt;a href=&quot;QLayoutItem.html&quot;&gt;&lt;tt&gt;QLayoutItem&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/layout.html&quot;&gt;Layout Classes&lt;/tt&gt;&lt;/a&gt;
@see Basic Layouts Example&lt;/tt&gt;
@see Border Layout Example&lt;/tt&gt;
@see Flow Layout Example&lt;/tt&gt; */">
    <method name="public QLayout(com.trolltech.qt.gui.QWidget parent)" doc="/**
&lt;p&gt;Constructs a new top-level &lt;a href=&quot;QLayout.html#QLayout()&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt;, with parent &lt;tt&gt;parent&lt;/tt&gt;. &lt;tt&gt;parent&lt;/tt&gt; may not be 0.&lt;/p&gt;
&lt;p&gt;There can be only one top-level layout for a widget. It is returned by QWidget::layout().&lt;/p&gt;
 */"/>
    <method name="public QLayout()" doc="/**
&lt;p&gt;Constructs a new child &lt;a href=&quot;QLayout.html#QLayout()&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This layout has to be inserted into another layout before geometry management will work.&lt;/p&gt;
 */"/>
    <method name="public final boolean activate()" doc="/**
&lt;p&gt;Redoes the layout for &lt;a href=&quot;QLayout.html#parentWidget()&quot;&gt;&lt;tt&gt;parentWidget&lt;/tt&gt;&lt;/a&gt; if necessary.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#update()&quot;&gt;&lt;tt&gt;update&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QWidget::updateGeometry&lt;/tt&gt; */"/>
    <method name="protected final void addChildLayout(com.trolltech.qt.gui.QLayout l)" doc="/**
&lt;p&gt;This function is called from &lt;tt&gt;addLayout()&lt;/tt&gt; or &lt;tt&gt;insertLayout()&lt;/tt&gt; functions in subclasses to add layout &lt;tt&gt;l&lt;/tt&gt; as a sub-layout.&lt;/p&gt;
&lt;p&gt;The only scenario in which you need to call it directly is if you implement a custom layout that supports nested layouts.&lt;/p&gt;

@see &lt;tt&gt;QBoxLayout::addLayout&lt;/tt&gt;
@see &lt;tt&gt;QBoxLayout::insertLayout&lt;/tt&gt;
@see &lt;tt&gt;QGridLayout::addLayout&lt;/tt&gt; */"/>
    <method name="protected final void addChildWidget(com.trolltech.qt.gui.QWidget w)" doc="/**
&lt;p&gt;This function is called from &lt;tt&gt;addWidget()&lt;/tt&gt; functions in subclasses to add &lt;tt&gt;w&lt;/tt&gt; as a child widget.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;w&lt;/tt&gt; is already in a layout, this function will give a warning and remove &lt;tt&gt;w&lt;/tt&gt; from the layout. This function must therefore be called before adding &lt;tt&gt;w&lt;/tt&gt; to the layout's data structure.&lt;/p&gt;
 */"/>
    <method name="public final void addWidget(com.trolltech.qt.gui.QWidget w)" doc="/**
&lt;p&gt;Adds widget &lt;tt&gt;w&lt;/tt&gt; to this layout in a manner specific to the layout. This function uses &lt;a href=&quot;QLayout.html#addItem(com.trolltech.qt.gui.QLayoutItemInterface)&quot;&gt;&lt;tt&gt;addItem&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.Qt.Alignment alignment()" doc="/**
&lt;p&gt;Returns the alignment of this item.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#setAlignment(com.trolltech.qt.gui.QLayout, com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;setAlignment&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final com.trolltech.qt.core.QRect alignmentRect(com.trolltech.qt.core.QRect arg__1)" doc="/**
&lt;p&gt;Returns the rectangle that should be covered when the geometry of this layout is set to &lt;tt&gt;arg__1&lt;/tt&gt;, provided that this layout supports &lt;a href=&quot;QLayout.html#setAlignment(com.trolltech.qt.gui.QLayout, com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;setAlignment&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The result is derived from &lt;a href=&quot;QLayout.html#sizeHint()&quot;&gt;&lt;tt&gt;sizeHint&lt;/tt&gt;&lt;/a&gt; and expanding(). It is never larger than &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QRect contentsRect()" doc="/**
&lt;p&gt;Returns the layout's &lt;a href=&quot;QLayout.html#geometry()&quot;&gt;&lt;tt&gt;geometry&lt;/tt&gt;&lt;/a&gt; rectangle, but taking into account the contents margins.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#setContentsMargins(int, int, int, int)&quot;&gt;&lt;tt&gt;setContentsMargins&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;getContentsMargins&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QSizePolicy.ControlTypes controlTypes()" doc="/**
&lt;p&gt;Returns the control type(s) for the layout item. For a &lt;a href=&quot;QWidgetItem.html&quot;&gt;&lt;tt&gt;QWidgetItem&lt;/tt&gt;&lt;/a&gt;, the control type comes from the widget's size policy; for a &lt;a href=&quot;QLayoutItem.html&quot;&gt;&lt;tt&gt;QLayoutItem&lt;/tt&gt;&lt;/a&gt;, the control types is derived from the layout's contents.&lt;/p&gt;

@see &lt;tt&gt;QSizePolicy::controlType&lt;/tt&gt; */"/>
    <method name="public final boolean isEnabled()" doc="/**
&lt;p&gt;Returns true if the layout is enabled; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#setEnabled(boolean)&quot;&gt;&lt;tt&gt;setEnabled&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QWidget menuBar()" doc="/**
&lt;p&gt;Returns the menu bar set for this layout, or 0 if no menu bar is set.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#setMenuBar(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;setMenuBar&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QWidget parentWidget()" doc="/**
&lt;p&gt;Returns the parent widget of this layout, or 0 if this layout is not installed on any widget.&lt;/p&gt;
&lt;p&gt;If the layout is a sub-layout, this function returns the parent widget of the parent layout.&lt;/p&gt;

@see &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QObject.html#parent()&quot;&gt;&lt;tt&gt;parent&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void removeItem(com.trolltech.qt.gui.QLayoutItemInterface arg__1)" doc="/**
&lt;p&gt;Removes the layout item &lt;tt&gt;arg__1&lt;/tt&gt; from the layout. It is the caller's responsibility to delete the item.&lt;/p&gt;
&lt;p&gt;Notice that &lt;tt&gt;arg__1&lt;/tt&gt; can be a layout (since &lt;a href=&quot;QLayout.html#QLayout()&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt; inherits &lt;a href=&quot;QLayoutItem.html&quot;&gt;&lt;tt&gt;QLayoutItem&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#removeWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;removeWidget&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QLayout.html#addItem(com.trolltech.qt.gui.QLayoutItemInterface)&quot;&gt;&lt;tt&gt;addItem&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void removeWidget(com.trolltech.qt.gui.QWidget w)" doc="/**
&lt;p&gt;Removes the widget &lt;tt&gt;w&lt;/tt&gt; 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.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; The ownership of &lt;tt&gt;w&lt;/tt&gt; remains the same as when it was added.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#removeItem(com.trolltech.qt.gui.QLayoutItemInterface)&quot;&gt;&lt;tt&gt;removeItem&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QWidget::setGeometry&lt;/tt&gt;
@see &lt;a href=&quot;QLayout.html#addWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;addWidget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setAlignment(com.trolltech.qt.core.Qt.Alignment alignment)" doc="/**
&lt;p&gt;Sets the alignment of this item to &lt;tt&gt;alignment&lt;/tt&gt;.&lt;/p&gt;

@see &lt;tt&gt;QLayoutItem::setAlignment&lt;/tt&gt; */"/>
    <method name="public final boolean setAlignment(com.trolltech.qt.gui.QWidget w, com.trolltech.qt.core.Qt.Alignment alignment)" doc="/**
&lt;p&gt;Sets the alignment for widget &lt;tt&gt;w&lt;/tt&gt; to &lt;tt&gt;alignment&lt;/tt&gt; and returns true if &lt;tt&gt;w&lt;/tt&gt; is found in this layout (not including child layouts); otherwise returns false.&lt;/p&gt;
 */"/>
    <method name="public final boolean setAlignment(com.trolltech.qt.gui.QLayout l, com.trolltech.qt.core.Qt.Alignment alignment)" doc="/**
&lt;p&gt;Sets the alignment for the layout &lt;tt&gt;l&lt;/tt&gt; to &lt;tt&gt;alignment&lt;/tt&gt; and returns true if &lt;tt&gt;l&lt;/tt&gt; is found in this layout (not including child layouts); otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#alignment()&quot;&gt;&lt;tt&gt;alignment&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setContentsMargins(int left, int top, int right, int bottom)" doc="/**
&lt;p&gt;Sets the &lt;tt&gt;left&lt;/tt&gt;, &lt;tt&gt;top&lt;/tt&gt;, &lt;tt&gt;right&lt;/tt&gt;, and &lt;tt&gt;bottom&lt;/tt&gt; margins to use around the layout.&lt;/p&gt;
&lt;p&gt;By default, &lt;a href=&quot;QLayout.html#QLayout()&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt; uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.&lt;/p&gt;

@see &lt;tt&gt;getContentsMargins&lt;/tt&gt;
@see &lt;tt&gt;QStyle::pixelMetric&lt;/tt&gt;
@see &lt;tt&gt;PM_LayoutLeftMargin&lt;/tt&gt;
@see &lt;tt&gt;PM_LayoutTopMargin&lt;/tt&gt;
@see &lt;tt&gt;PM_LayoutRightMargin&lt;/tt&gt;
@see &lt;tt&gt;PM_LayoutBottomMargin&lt;/tt&gt; */"/>
    <method name="public final void setEnabled(boolean arg__1)" doc="/**
&lt;p&gt;Enables this layout if &lt;tt&gt;arg__1&lt;/tt&gt; is true, otherwise disables it.&lt;/p&gt;
&lt;p&gt;An enabled layout adjusts dynamically to changes; a disabled layout acts as if it did not exist.&lt;/p&gt;
&lt;p&gt;By default all layouts are enabled.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#isEnabled()&quot;&gt;&lt;tt&gt;isEnabled&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setMargin(int arg__1)" doc="/**
&lt;p&gt;This method is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.&lt;/p&gt;
&lt;p&gt;Sets the width of the outside border of the layout to &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Use &lt;a href=&quot;QLayout.html#setContentsMargins(int, int, int, int)&quot;&gt;&lt;tt&gt;setContentsMargins&lt;/tt&gt;&lt;/a&gt; and getContentsMargins() instead.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#contentsRect()&quot;&gt;&lt;tt&gt;contentsRect&lt;/tt&gt;&lt;/a&gt;
@see spacing&lt;/tt&gt; */"/>
    <method name="public final void setMenuBar(com.trolltech.qt.gui.QWidget w)" doc="/**
&lt;p&gt;Tells the geometry manager to place the menu bar &lt;tt&gt;w&lt;/tt&gt; at the top of &lt;a href=&quot;QLayout.html#parentWidget()&quot;&gt;&lt;tt&gt;parentWidget&lt;/tt&gt;&lt;/a&gt;, outside QWidget::contentsMargins(). All child widgets are placed below the bottom edge of the menu bar.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#menuBar()&quot;&gt;&lt;tt&gt;menuBar&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setSizeConstraint(com.trolltech.qt.gui.QLayout.SizeConstraint arg__1)" doc="/**
&lt;p&gt;Sets the resize mode of the layout to &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The default mode is &lt;a href=&quot;QLayout.html#SizeConstraint-enum&quot;&gt;&lt;tt&gt;SetDefaultConstraint&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#sizeConstraint()&quot;&gt;&lt;tt&gt;sizeConstraint&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setWidgetSpacing(int arg__1)" doc="/**
&lt;p&gt;Sets the spacing between widgets inside the layout to &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;For &lt;a href=&quot;QGridLayout.html&quot;&gt;&lt;tt&gt;QGridLayout&lt;/tt&gt;&lt;/a&gt;, it is possible to set different horizontal and vertical spacings using setHorizontalSpacing() and setVerticalSpacing(). In that case, spacing() returns -1.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#widgetSpacing()&quot;&gt;&lt;tt&gt;widgetSpacing&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QLayout.html#contentsRect()&quot;&gt;&lt;tt&gt;contentsRect&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;getContentsMargins&lt;/tt&gt;
@see &lt;tt&gt;QStyle::layoutSpacing&lt;/tt&gt;
@see &lt;tt&gt;QStyle::pixelMetric&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QLayout.SizeConstraint sizeConstraint()" doc="/**
&lt;p&gt;Returns the resize mode of the layout.&lt;/p&gt;
&lt;p&gt;The default mode is &lt;a href=&quot;QLayout.html#SizeConstraint-enum&quot;&gt;&lt;tt&gt;SetDefaultConstraint&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#setSizeConstraint(com.trolltech.qt.gui.QLayout.SizeConstraint)&quot;&gt;&lt;tt&gt;setSizeConstraint&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int widgetSpacing()" doc="/**
&lt;p&gt;Returns the spacing between widgets inside the layout.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;For &lt;a href=&quot;QGridLayout.html&quot;&gt;&lt;tt&gt;QGridLayout&lt;/tt&gt;&lt;/a&gt;, it is possible to set different horizontal and vertical spacings using setHorizontalSpacing() and setVerticalSpacing(). In that case, spacing() returns -1.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#setWidgetSpacing(int)&quot;&gt;&lt;tt&gt;setWidgetSpacing&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QLayout.html#contentsRect()&quot;&gt;&lt;tt&gt;contentsRect&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;getContentsMargins&lt;/tt&gt;
@see &lt;tt&gt;QStyle::layoutSpacing&lt;/tt&gt;
@see &lt;tt&gt;QStyle::pixelMetric&lt;/tt&gt; */"/>
    <method name="public final int totalHeightForWidth(int w)" doc="/**
&lt;p&gt;&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QSize totalMaximumSize()" doc="/**
&lt;p&gt;&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QSize totalMinimumSize()" doc="/**
&lt;p&gt;&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QSize totalSizeHint()" doc="/**
&lt;p&gt;&lt;/p&gt;
 */"/>
    <method name="public final void update()" doc="/**
&lt;p&gt;Updates the layout for &lt;a href=&quot;QLayout.html#parentWidget()&quot;&gt;&lt;tt&gt;parentWidget&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You should generally not need to call this because it is automatically called at the most appropriate times.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#activate()&quot;&gt;&lt;tt&gt;activate&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QLayout.html#invalidate()&quot;&gt;&lt;tt&gt;invalidate&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final void widgetEvent(com.trolltech.qt.core.QEvent arg__1)" doc="/**
&lt;p&gt;&lt;/p&gt;
 */"/>
    <method name="public abstract void addItem(com.trolltech.qt.gui.QLayoutItemInterface arg__1)" doc="/**
&lt;p&gt;Implemented in subclasses to add an &lt;tt&gt;arg__1&lt;/tt&gt;. How it is added is specific to each subclass.&lt;/p&gt;
&lt;p&gt;This function is not usually called in application code. To add a widget to a layout, use the &lt;a href=&quot;QLayout.html#addWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;addWidget&lt;/tt&gt;&lt;/a&gt; function; to add a child layout, use the addLayout() function provided by the relevant &lt;a href=&quot;QLayout.html#QLayout()&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt; subclass.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; The ownership of &lt;tt&gt;arg__1&lt;/tt&gt; is transferred to the layout, and it's the layout's responsibility to delete it.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#addWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;addWidget&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QBoxLayout::addLayout&lt;/tt&gt;
@see &lt;tt&gt;QGridLayout::addLayout&lt;/tt&gt; */"/>
    <method name="protected void childEvent(com.trolltech.qt.core.QChildEvent e)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public abstract int count()" doc="/**
&lt;p&gt;Must be implemented in subclasses to return the number of items in the layout.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#itemAt(int)&quot;&gt;&lt;tt&gt;itemAt&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public com.trolltech.qt.core.Qt.Orientations expandingDirections()" doc="/**
&lt;p&gt;Returns whether this layout can make use of more space than &lt;a href=&quot;QLayout.html#sizeHint()&quot;&gt;&lt;tt&gt;sizeHint&lt;/tt&gt;&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;The default implementation returns Qt::Horizontal | Qt::Vertical. Subclasses reimplement it to return a meaningful value based on their child widgets's &lt;a href=&quot;QSizePolicy.html&quot;&gt;size policies&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#sizeHint()&quot;&gt;&lt;tt&gt;sizeHint&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public com.trolltech.qt.core.QRect geometry()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#setGeometry(com.trolltech.qt.core.QRect)&quot;&gt;&lt;tt&gt;setGeometry&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean hasHeightForWidth()" doc="/**
&lt;p&gt;Returns true if this layout's preferred height depends on its width; otherwise returns false. The default implementation returns false.&lt;/p&gt;
&lt;p&gt;Reimplement this function in layout managers that support height for width.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#heightForWidth(int)&quot;&gt;&lt;tt&gt;heightForWidth&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QWidget::heightForWidth&lt;/tt&gt; */"/>
    <method name="public int heightForWidth(int arg__1)" doc="/**
&lt;p&gt;Returns the preferred height for this layout item, given the width &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The default implementation returns -1, indicating that the preferred height is independent of the width of the item. Using the function &lt;a href=&quot;QLayout.html#hasHeightForWidth()&quot;&gt;&lt;tt&gt;hasHeightForWidth&lt;/tt&gt;&lt;/a&gt; will typically be much faster than calling this function and testing for -1.&lt;/p&gt;
&lt;p&gt;Reimplement this function in layout managers that support height for width. A typical implementation will look like this:&lt;/p&gt;
&lt;pre&gt;    int MyLayout::heightForWidth(int w) const
    {
        if (cache_dirty || cached_width != w) {
            &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; not all C++ compilers support &amp;quot;mutable&amp;quot;
            MyLayout *that = (MyLayout*)this;
            int h = calculateHeightForWidth(w);
            that-&amp;gt;cached_hfw = h;
            return h;
        }
        return cached_hfw;
    }&lt;/pre&gt;
&lt;p&gt;Caching is strongly recommended; without it layout will take exponential time.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#hasHeightForWidth()&quot;&gt;&lt;tt&gt;hasHeightForWidth&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public int indexOf(com.trolltech.qt.gui.QWidget arg__1)" doc="/**
&lt;p&gt;Searches for widget &lt;tt&gt;arg__1&lt;/tt&gt; in this layout (not including child layouts).&lt;/p&gt;
&lt;p&gt;Returns the index of &lt;tt&gt;arg__1&lt;/tt&gt;, or -1 if &lt;tt&gt;arg__1&lt;/tt&gt; is not found.&lt;/p&gt;
&lt;p&gt;The default implementation iterates over all items using &lt;a href=&quot;QLayout.html#itemAt(int)&quot;&gt;&lt;tt&gt;itemAt&lt;/tt&gt;&lt;/a&gt;&lt;/p&gt;
 */"/>
    <method name="public void invalidate()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean isEmpty()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public abstract com.trolltech.qt.gui.QLayoutItemInterface itemAt(int index)" doc="/**
&lt;p&gt;Must be implemented in subclasses to return the layout item at &lt;tt&gt;index&lt;/tt&gt;. If there is no such item, the function must return 0. Items are numbered consecutively from 0. If an item is deleted, other items will be renumbered.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;pre&gt;    static void paintLayout(QPainter *painter, QLayoutItem *item)
    {
        QLayout *layout = item-&amp;gt;layout();
        if (layout) {
            for (int i = 0; i &amp;lt; layout-&amp;gt;count(); ++i)
                paintLayout(painter, layout-&amp;gt;itemAt(i));
        }
        painter-&amp;gt;drawRect(layout-&amp;gt;geometry());
    }

    void MyWidget::paintEvent(QPaintEvent *)
    {
        QPainter painter(this);
        if (layout())
            paintLayout(&amp;amp;painter, layout());
    }&lt;/pre&gt;

@see &lt;a href=&quot;QLayout.html#count()&quot;&gt;&lt;tt&gt;count&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QLayout.html#takeAt(int)&quot;&gt;&lt;tt&gt;takeAt&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public com.trolltech.qt.gui.QLayout layout()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public com.trolltech.qt.core.QSize maximumSize()" doc="/**
&lt;p&gt;Returns the maximum size of this layout. This is the largest size that the layout can have while still respecting the specifications.&lt;/p&gt;
&lt;p&gt;The returned value doesn't include the space required by QWidget::setContentsMargins() or &lt;a href=&quot;QLayout.html#menuBar()&quot;&gt;&lt;tt&gt;menuBar&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The default implementation allows unlimited resizing.&lt;/p&gt;
 */"/>
    <method name="public int minimumHeightForWidth(int arg__1)" doc="/**
&lt;p&gt;Returns the minimum height this widget needs for the given width, &lt;tt&gt;arg__1&lt;/tt&gt;. The default implementation simply returns &lt;a href=&quot;QLayout.html#heightForWidth(int)&quot;&gt;&lt;tt&gt;heightForWidth&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;arg__1&lt;/tt&gt;).&lt;/p&gt;
 */"/>
    <method name="public com.trolltech.qt.core.QSize minimumSize()" doc="/**
&lt;p&gt;Returns the minimum size of this layout. This is the smallest size that the layout can have while still respecting the specifications.&lt;/p&gt;
&lt;p&gt;The returned value doesn't include the space required by QWidget::setContentsMargins() or &lt;a href=&quot;QLayout.html#menuBar()&quot;&gt;&lt;tt&gt;menuBar&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The default implementation allows unlimited resizing.&lt;/p&gt;
 */"/>
    <method name="public abstract void setGeometry(com.trolltech.qt.core.QRect arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#geometry()&quot;&gt;&lt;tt&gt;geometry&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public abstract com.trolltech.qt.core.QSize sizeHint()" doc="/**
&lt;p&gt;Implemented in subclasses to return the preferred size of this item.&lt;/p&gt;
 */"/>
    <method name="public com.trolltech.qt.gui.QSpacerItem spacerItem()" doc="/**
&lt;p&gt;If this item is a &lt;a href=&quot;QSpacerItem.html&quot;&gt;&lt;tt&gt;QSpacerItem&lt;/tt&gt;&lt;/a&gt;, it is returned as a &lt;a href=&quot;QSpacerItem.html&quot;&gt;&lt;tt&gt;QSpacerItem&lt;/tt&gt;&lt;/a&gt;; otherwise 0 is returned. This function provides type-safe casting.&lt;/p&gt;
 */"/>
    <method name="public abstract com.trolltech.qt.gui.QLayoutItemInterface takeAt(int index)" doc="/**
&lt;p&gt;Must be implemented in subclasses to remove the layout item at &lt;tt&gt;index&lt;/tt&gt; 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 deleted, other items will be renumbered.&lt;/p&gt;
&lt;p&gt;The following code fragment shows a safe way to remove all items from a layout:&lt;/p&gt;
&lt;pre&gt;    QLayoutItem *child;
    while ((child = layout-&amp;gt;takeAt(0)) != 0) {
        ...
        delete child;
    }&lt;/pre&gt;

@see &lt;a href=&quot;QLayout.html#itemAt(int)&quot;&gt;&lt;tt&gt;itemAt&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QLayout.html#count()&quot;&gt;&lt;tt&gt;count&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public com.trolltech.qt.gui.QWidget widget()" doc="/**
&lt;p&gt;If this item is a &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;, it is returned as a &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;; otherwise 0 is returned. This function provides type-safe casting.&lt;/p&gt;
 */"/>
    <method name="public static com.trolltech.qt.core.QSize closestAcceptableSize(com.trolltech.qt.gui.QWidget w, com.trolltech.qt.core.QSize s)" doc="/**
&lt;p&gt;Returns a size that satisfies all size constraints on &lt;tt&gt;w&lt;/tt&gt;, including &lt;a href=&quot;QLayout.html#heightForWidth(int)&quot;&gt;&lt;tt&gt;heightForWidth&lt;/tt&gt;&lt;/a&gt; and that is as close as possible to &lt;tt&gt;s&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <enum name="SizeConstraint" doc="/**
&lt;p&gt;The possible values are:&lt;/p&gt;
&lt;p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; width=&quot;100%&quot;&gt;
&lt;tr&gt;&lt;th width=&quot;25%&quot;&gt;Constant&lt;/th&gt;&lt;th width=&quot;15%&quot;&gt;Value&lt;/th&gt;&lt;th width=&quot;60%&quot;&gt;Description&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;tt&gt;SetDefaultConstraint&lt;/tt&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;tt&gt;0&lt;/tt&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;The main widget's minimum size is set to &lt;a href=&quot;QLayout.html#minimumSize()&quot;&gt;&lt;tt&gt;minimumSize&lt;/tt&gt;&lt;/a&gt;, unless the widget already has a minimum size.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;tt&gt;SetFixedSize&lt;/tt&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;tt&gt;3&lt;/tt&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;The main widget's size is set to &lt;a href=&quot;QLayout.html#sizeHint()&quot;&gt;&lt;tt&gt;sizeHint&lt;/tt&gt;&lt;/a&gt;; it cannot be resized at all.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;tt&gt;SetMinimumSize&lt;/tt&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;tt&gt;2&lt;/tt&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;The main widget's minimum size is set to &lt;a href=&quot;QLayout.html#minimumSize()&quot;&gt;&lt;tt&gt;minimumSize&lt;/tt&gt;&lt;/a&gt;; it cannot be smaller.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;tt&gt;SetMaximumSize&lt;/tt&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;tt&gt;4&lt;/tt&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;The main widget's maximum size is set to &lt;a href=&quot;QLayout.html#maximumSize()&quot;&gt;&lt;tt&gt;maximumSize&lt;/tt&gt;&lt;/a&gt;; it cannot be larger.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;tt&gt;SetMinAndMaxSize&lt;/tt&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;tt&gt;5&lt;/tt&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;The main widget's minimum size is set to &lt;a href=&quot;QLayout.html#minimumSize()&quot;&gt;&lt;tt&gt;minimumSize&lt;/tt&gt;&lt;/a&gt; and its maximum size is set to &lt;a href=&quot;QLayout.html#maximumSize()&quot;&gt;&lt;tt&gt;maximumSize&lt;/tt&gt;&lt;/a&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;tt&gt;SetNoConstraint&lt;/tt&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;tt&gt;1&lt;/tt&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;The widget is not constrained.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html#setSizeConstraint(com.trolltech.qt.gui.QLayout.SizeConstraint)&quot;&gt;&lt;tt&gt;setSizeConstraint&lt;/tt&gt;&lt;/a&gt; */">
        <enum-value name="SetDefaultConstraint" doc="/**
&lt;p&gt;The main widget's minimum size is set to &lt;a href=&quot;QLayout.html#minimumSize()&quot;&gt;&lt;tt&gt;minimumSize&lt;/tt&gt;&lt;/a&gt;, unless the widget already has a minimum size.&lt;/p&gt;
 */"/>
        <enum-value name="SetNoConstraint" doc="/**
&lt;p&gt;The widget is not constrained.&lt;/p&gt;
 */"/>
        <enum-value name="SetMinimumSize" doc="/**
&lt;p&gt;The main widget's minimum size is set to &lt;a href=&quot;QLayout.html#minimumSize()&quot;&gt;&lt;tt&gt;minimumSize&lt;/tt&gt;&lt;/a&gt;; it cannot be smaller.&lt;/p&gt;
 */"/>
        <enum-value name="SetFixedSize" doc="/**
&lt;p&gt;The main widget's size is set to &lt;a href=&quot;QLayout.html#sizeHint()&quot;&gt;&lt;tt&gt;sizeHint&lt;/tt&gt;&lt;/a&gt;; it cannot be resized at all.&lt;/p&gt;
 */"/>
        <enum-value name="SetMaximumSize" doc="/**
&lt;p&gt;The main widget's maximum size is set to &lt;a href=&quot;QLayout.html#maximumSize()&quot;&gt;&lt;tt&gt;maximumSize&lt;/tt&gt;&lt;/a&gt;; it cannot be larger.&lt;/p&gt;
 */"/>
        <enum-value name="SetMinAndMaxSize" doc="/**
&lt;p&gt;The main widget's minimum size is set to &lt;a href=&quot;QLayout.html#minimumSize()&quot;&gt;&lt;tt&gt;minimumSize&lt;/tt&gt;&lt;/a&gt; and its maximum size is set to &lt;a href=&quot;QLayout.html#maximumSize()&quot;&gt;&lt;tt&gt;maximumSize&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
</enum>
</class>
