开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜