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

QWidget * QApplication::activePopupWidget (  )  [static]

Returns the active popup widget.

A popup widget is a special top-level widget that sets the Qt::WType_Popup widget flag, e.g. the QMenu widget. When the application opens a popup widget, all events are sent to the popup. Normal widgets and modal widgets cannot be accessed before the popup widget is closed.

Only other popup widgets may be opened when a popup widget is shown. The popup widgets are organized in a stack. This function returns the active popup widget at the top of the stack.

See also:
activeModalWidget(), topLevelWidgets()

Definition at line 858 of file qapplication.cpp.

References QList< T >::isEmpty(), and QList< T >::last().

Referenced by QLineEdit::focusOutEvent(), and QGraphicsView::viewportEvent().

{
    return QApplicationPrivate::popupWidgets && !QApplicationPrivate::popupWidgets->isEmpty() ?
        QApplicationPrivate::popupWidgets->last() : 0;
}


Generated by  Doxygen 1.6.0   Back to index