Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void QBoxLayout::addWidget ( QWidget widget,
int  stretch = 0,
Qt::Alignment  alignment = 0 
) [inherited]

Adds widget to the end of this box layout, with a stretch factor of stretch and alignment alignment.

The stretch factor applies only in the {direction()}{direction} of the QBoxLayout, and is relative to the other boxes and widgets in this QBoxLayout. Widgets and boxes with higher stretch factors grow more.

If the stretch factor is 0 and nothing else in the QBoxLayout has a stretch factor greater than zero, the space is distributed according to the QWidget:sizePolicy() of each widget that's involved.

The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell.

See also:
insertWidget(), addItem(), addLayout(), addStretch(), addSpacing(), addStrut()

Definition at line 1056 of file qboxlayout.cpp.

References QBoxLayout::insertWidget().

Referenced by Q3FileDialog::addWidgets(), Q3FileDialog::init(), Q3Wizard::layOutButtonRow(), Q3Wizard::layOutTitleRow(), QCalendarWidget::QCalendarWidget(), QFontDialog::QFontDialog(), QPageSetupDialog::QPageSetupDialog(), QStatusBar::reformat(), Q3TabDialog::setUpLayout(), and Q3DockWindow::setWidget().

    insertWidget(-1, widget, stretch, alignment);

Generated by  Doxygen 1.6.0   Back to index