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

WId QWidget::effectiveWinId (  )  const [inherited]

Since:
4.4
Returns the effective window system identifier of the widget, i.e. the native parent's window system identifier.

Note:
We recommend that you do not store this value as it is likely to change during run-time.
See also:
nativeParentWidget()

Definition at line 2049 of file qwidget.cpp.

References QWidget::internalWinId(), QWidget::nativeParentWidget(), and QWidget::testAttribute().

Referenced by QWindowsVistaStyle::drawComplexControl(), QWidget::grabKeyboard(), QWidget::grabMouse(), and QWidget::setWindowState().

{
    WId id = internalWinId();
    if (id || !testAttribute(Qt::WA_WState_Created))
        return id;
    QWidget *realParent = nativeParentWidget();
    Q_ASSERT(realParent);
    Q_ASSERT(realParent->internalWinId());
    return realParent->internalWinId();
}


Generated by  Doxygen 1.6.0   Back to index