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

void QWidget::setFixedHeight ( int  h  )  [inherited]

Sets both the minimum and maximum heights of the widget to h without changing the widths. Provided for convenience.

See also:
sizeHint() minimumSize() maximumSize() setFixedSize()

Definition at line 3752 of file qwidget.cpp.

References QWidget::maximumSize, QWidget::minimumSize, and QWidget::width.

{
    Q_D(QWidget);
    d->createExtra();
    uint explMin = d->extra->explicitMinSize | Qt::Vertical;
    uint explMax = d->extra->explicitMaxSize | Qt::Vertical;
    setMinimumSize(minimumSize().width(), h);
    setMaximumSize(maximumSize().width(), h);
    d->extra->explicitMinSize = explMin;
    d->extra->explicitMaxSize = explMax;
}


Generated by  Doxygen 1.6.0   Back to index