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

WId QWidget::winId (  )  const [inherited]

Returns the window system identifier of the widget.

Portable in principle, but if you use it you are probably about to do something non-portable. Be careful.

See also:
find()

Definition at line 1694 of file qwidget.cpp.

References QWidget::createWinId(), and QWidget::testAttribute().

Referenced by QSizeGrip::mouseMoveEvent(), QRubberBand::QRubberBand(), QWidget::repaint(), QGLWidget::setColormap(), QGLWidget::setContext(), QMessageBox::showEvent(), and QGLWidget::~QGLWidget().

{
    if (!testAttribute(Qt::WA_WState_Created)) {
        QWidget *that = const_cast<QWidget*>(this);
        that->d_func()->createWinId();
        return that->data->winid;
    }
    return data->winid;
}


Generated by  Doxygen 1.6.0   Back to index