QX11EmbedContainer code error

这一生的挚爱 提交于 2019-12-13 03:40:38

问题


Given below is the code for embedding an application using QX11EmbedContainer.

#include "mainwindow.h"
#include <QApplication>
#include <QX11EmbedContainer>
#include <QProcess>

using namespace std;

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    QX11EmbedContainer container;
    container.show();

    QProcess process(&container);
    process.start("C:/Users/Administrator/Desktop.../.exe");

    int status=a.exec();
    process.close();
    return status;
}

On running the application the error that I am getting is:

C:\Qt4.8.5\src\gui\kernel\qx11embed_x11.h:77: error: C2061: syntax error : identifier 'XEvent'

Where am I going wrong?


回答1:


QX11EmbedContainer is X11-specific, it will not work under other systems (like Windows).



来源:https://stackoverflow.com/questions/21527851/qx11embedcontainer-code-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!