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

void QGridLayout::setColumnStretch ( int  column,
int  stretch 
)

Sets the stretch factor of column column to stretch. The first column is number 0.

The stretch factor is relative to the other columns in this grid. Columns with a higher stretch factor take more of the available space.

The default stretch factor is 0. If the stretch factor is 0 and no other column in this table can grow at all, the column may still grow.

An alternative approach is to add spacing using addItem() with a QSpacerItem.

See also:
columnStretch(), setRowStretch()

Definition at line 1693 of file qgridlayout.cpp.

References invalidate().

Referenced by AddDialog::AddDialog(), Dialog::createGridGroupBox(), MainWindow::createToolBox(), Dialog::Dialog(), QErrorMessage::QErrorMessage(), QFontDialog::QFontDialog(), and WidgetGallery::WidgetGallery().

{
    Q_D(QGridLayout);
    d->setColStretch(column, stretch);
    invalidate();
}


Generated by  Doxygen 1.6.0   Back to index