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

void QWidget::raise (  )  [slot, inherited]

Raises this widget to the top of the parent widget's stack.

After this call the widget will be visually in front of any overlapping sibling widgets.

When using activateWindow(), you can call this function to ensure that the window is stacked on top.
See also:
lower(), stackUnder()

Definition at line 9758 of file qwidget.cpp.

References QObject::children(), QWidget::create(), QList< T >::indexOf(), QWidget::isWindow(), QList< T >::move(), QWidget::parentWidget(), QCoreApplication::sendEvent(), QList< T >::size(), and QWidget::testAttribute().

Referenced by Q3ComboBox::popup(), qdesigner_internal::Layout::setup(), View::showInformation(), and Q3Table::updateGeometries().

    if (!isWindow()) {
        QWidget *p = parentWidget();
        const int parentChildCount = p->d_func()->children.size();
        if (parentChildCount < 2)
        const int from = p->d_func()->children.indexOf(this);
        Q_ASSERT(from >= 0);
        // Do nothing if the widget is already in correct stacking order _and_ created.
        if (from != parentChildCount -1)
            p->d_func()->children.move(from, parentChildCount - 1);
        if (!testAttribute(Qt::WA_WState_Created) && p->testAttribute(Qt::WA_WState_Created))
        else if (from == parentChildCount - 1)

#ifndef Q_WS_MAC
        QRegion region(rect());
        d->subtractOpaqueSiblings(region, QPoint());
    if (testAttribute(Qt::WA_WState_Created))

    QEvent e(QEvent::ZOrderChange);
    QApplication::sendEvent(this, &e);

Generated by  Doxygen 1.6.0   Back to index