简体   繁体   中英

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 function 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM