PDA

View Full Version : in Xlib, we have Window; in Qt, what we have ???



dzh1121
11th June 2010, 22:27
Dear All,

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

Note: I need to use the XISelectEvents (http://www.x.org/releases/X11R7.5/doc/man/man3/XIGetSelectedEvents.3.html). for XI2 events.

my efforts:

Currently, I'' using
win = QX11Info::appRootWindow();. according to its definition (http://doc.trolltech.com/4.3/qx11info.html#appRootWindow), it is not the window of my created program.
I've also tried
win = QX11Info::appScreen();. and
win = Qt::Window;
But both report "XError: BadWindow"

I've read through the definition of QMainWindow (http://doc.trolltech.com/4.5/qt4-mainwindow.html), and Window Flag (http://doc.trolltech.com/4.3/widgets-windowflags.html).
But no luck.

Thanks in advance for your suggestion/direction/teaching.

wysota
11th June 2010, 22:30
What you are looking for is QWidget::winId().

dzh1121
11th June 2010, 22:46
thanks a million.
You know what? you guys are so much helpful!!!!!!!!!!:)
Yeah, I've seen windId, but I had misread it as "winLd" .
Thanks a million.

dzh1121
18th June 2010, 09:34
wysota

Thanks.

Tiger