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 1092 of file qboxlayout.cpp.

References QBoxLayout::insertWidget().

Referenced by AddDialog::AddDialog(), Q3FileDialog::addWidgets(), ApplicationsTab::ApplicationsTab(), CalculatorForm::CalculatorForm(), ClassInfoPage::ClassInfoPage(), ConclusionPage::ConclusionPage(), ControllerWindow::ControllerWindow(), Screenshot::createButtonsLayout(), Window::createDoubleSpinBoxes(), Window::createFirstExclusiveGroup(), Window::createGeneralOptionsGroupBox(), Dialog::createHorizontalGroupBox(), Window::createIconGroupBox(), MainWindow::createIconSizeGroupBox(), MainWindow::createImagesGroupBox(), Window::createNonExclusiveGroup(), MainWindow::createPreviewGroupBox(), Window::createPushButtonGroup(), Window::createSecondExclusiveGroup(), Window::createSpinBoxes(), Window::createTextFormatsGroupBox(), WidgetGallery::createTopLeftGroupBox(), WidgetGallery::createTopRightGroupBox(), Dialog::Dialog(), DragWidget::DragWidget(), DropSiteWindow::DropSiteWindow(), Q3ToolBar::event(), FileReader::FileReader(), FindDialog::FindDialog(), FindWidget::FindWidget(), GeneralTab::GeneralTab(), Q3FileDialog::init(), LCDRange::init(), IntroPage::IntroPage(), Q3Wizard::layOutButtonRow(), Q3Wizard::layOutTitleRow(), LCDRange::LCDRange(), MainWindow::MainWindow(), MyWidget::MyWidget(), NewAddressTab::NewAddressTab(), PermissionsTab::PermissionsTab(), PreviewWindow::PreviewWindow(), PrintPanel::PrintPanel(), QCalendarWidget::QCalendarWidget(), QFontDialog::QFontDialog(), QHelpSearchQueryWidget::QHelpSearchQueryWidget(), QPageSetupDialog::QPageSetupDialog(), QStatusBar::reformat(), Screenshot::Screenshot(), Server::Server(), Q3TabDialog::setUpLayout(), MainWindow::setupUi(), Q3DockWindow::setWidget(), SlidersGroup::SlidersGroup(), TabDialog::TabDialog(), TableEditor::TableEditor(), TextFinder::TextFinder(), TicTacToeDialog::TicTacToeDialog(), Phonon::VideoPlayer::VideoPlayer(), WidgetGallery::WidgetGallery(), and Window::Window().

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


Generated by  Doxygen 1.6.0   Back to index