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

QX11EmbedWidget::QX11EmbedWidget ( QWidget parent = 0  ) 

Constructs a QX11EmbedWidget object with the given parent.

Definition at line 456 of file qx11embed_x11.cpp.

References QObject::installEventFilter(), QCoreApplication::instance(), and QWidget::winId().

    : QWidget(*new QX11EmbedWidgetPrivate, parent, 0)
{
    XSetErrorHandler(x11ErrorHandler);
    initXEmbedAtoms(x11Info().display());

    XSelectInput(x11Info().display(), winId(),
                 KeyPressMask | KeyReleaseMask | ButtonPressMask
                    | ButtonReleaseMask
                    | KeymapStateMask | ButtonMotionMask | PointerMotionMask
                    | FocusChangeMask
                    | ExposureMask | StructureNotifyMask
                    | SubstructureNotifyMask | PropertyChangeMask);

    unsigned int data[] = {XEMBED_VERSION, XEMBED_MAPPED};
    XChangeProperty(x11Info().display(), winId(), _XEMBED_INFO,
                    XA_CARDINAL, 32, PropModeReplace,
                    (unsigned char*) data, 2);

    setFocusPolicy(Qt::StrongFocus);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    QApplication::instance()->installEventFilter(this);
}


Generated by  Doxygen 1.6.0   Back to index