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.

Qt Code:
  1. display=NULL;
  2. // display=XOpenDisplay(NULL); <<-- NOT WORKING !!
  3. display=QX11Info::display();
  4. printf("display=%d\n",display);
  5. if (!display) { qDebug("unable to open local display"); return;}
  6. window=RootWindow(display,0);
To copy to clipboard, switch view to plain text mode 

How can I use XOpenDisplay under QT?

thanx.