Control cursor with c++ and x11
What x11 header file and function would I use to change the position of the cursor on the display? I have heard there is a straight forward funct开发者_如何学Goion on Vc++ but I wish to be able to use this on linux.
You can't trivially port programs from windows to xwindows, at least not without using a cross platform toolkit like gtk+ or Qt.
That said, the most basic way to move the pointer about on X is using the XWarpPointer()
method, which is to be had by including X11/Xlib.h
EDIT:
Apparently you are using Qt after all. you need to use QCursor::setpos
which is defined in QCursor
精彩评论