Dear All,

in Xlib, we have Window class, to specify a Window a defined window.
In Qt, how could I get this argument?

Note: I need to use the XISelectEvents. for XI2 events.

my efforts:

Currently, I'' using
Qt Code:
  1. win = QX11Info::appRootWindow();
To copy to clipboard, switch view to plain text mode 
. according to its definition, it is not the window of my created program.
I've also tried
Qt Code:
  1. win = QX11Info::appScreen();
To copy to clipboard, switch view to plain text mode 
. and
Qt Code:
  1. win = Qt::Window;
To copy to clipboard, switch view to plain text mode 
But both report "XError: BadWindow"

I've read through the definition of QMainWindow, and Window Flag.
But no luck.

Thanks in advance for your suggestion/direction/teaching.