Hi
I was trying to do some core X11 operations from Qt , but nothing works until I replaced XOpenDisplay(NULL) with X11Info::display() , then all operations worked fine.
I printed both pointers received from functions and they are not the same at all.
display=NULL;
// display=XOpenDisplay(NULL); <<-- NOT WORKING !!
printf("display=%d\n",display);
if (!display) { qDebug("unable to open local display"); return;}
window=RootWindow(display,0);
display=NULL;
// display=XOpenDisplay(NULL); <<-- NOT WORKING !!
display=QX11Info::display();
printf("display=%d\n",display);
if (!display) { qDebug("unable to open local display"); return;}
window=RootWindow(display,0);
To copy to clipboard, switch view to plain text mode
How can I use XOpenDisplay under QT?
thanx.
Bookmarks