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

void QFrame::setFrameStyle ( int  style  )  [inherited]

Sets the frame style to style.

The style is the bitwise OR between a frame shape and a frame shadow style. See the picture of the frames in the main class documentation.

The frame shapes are given in {QFrame::Shape} and the shadow styles in {QFrame::Shadow}.

If a mid-line width greater than 0 is specified, an additional line is drawn for Raised or Sunken Box, HLine, and VLine frames. The mid-color of the current color group is used for drawing middle lines.

See also:
frameStyle()

Definition at line 315 of file qframe.cpp.

References QWidget::setAttribute(), QWidget::testAttribute(), and QWidget::update().

Referenced by EchoWindow::createGUI(), Window::createLabel(), Dialog::Dialog(), DragWidget::DragWidget(), DropArea::DropArea(), GeneralTab::GeneralTab(), Q3ToolBar::init(), QHeaderView::initialize(), PermissionsTab::PermissionsTab(), Q3ScrollView::Q3ScrollView(), QHelpSearchQueryWidget::QHelpSearchQueryWidget(), QMdiArea::QMdiArea(), and TetrixWindow::TetrixWindow().

{
    Q_D(QFrame);
    if (!testAttribute(Qt::WA_WState_OwnSizePolicy)) {
        QSizePolicy sp;

        switch (style & Shape_Mask) {
        case HLine:
            sp = QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed, QSizePolicy::Line);
            break;
        case VLine:
            sp = QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum, QSizePolicy::Line);
            break;
        default:
            sp = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred, QSizePolicy::Frame);
        }
        setSizePolicy(sp);
        setAttribute(Qt::WA_WState_OwnSizePolicy, false);
    }
    d->frameStyle = (short)style;
    update();
    d->updateFrameWidth();
    d->oldFrameStyle = (short)style;
}


Generated by  Doxygen 1.6.0   Back to index