Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

is there any option to move cursor move from x to y position pro-grammatically



  • This post is deleted!


  • [static] void QCursor::setPos(QScreen *screen, int x, int y)
    Moves the cursor (hot spot) of the screen to the global screen position (x, y).
    You can call QWidget::mapToGlobal() to translate widget coordinates to global screen coordinates.
    Note: Calling this function results in changing the cursor position through the windowing system. The windowing system will typically respond by sending mouse events to the application's window. This means that the usage of this function should be avoided in unit tests and everywhere where fake mouse events are being injected via QWindowSystemInterface because the windowing system's mouse state (with regards to buttons for example) may not match the state in the application-generated events.
    Note: On platforms where there is no windowing system or cursors are not available, this function may do nothing.

    [static] void QCursor::setPos(int x, int y)
    Moves the cursor (hot spot) of the primary screen to the global screen position (x, y).
    You can call QWidget::mapToGlobal() to translate widget coordinates to global screen coordinates.

    Is that what you want?



  • This post is deleted!

Log in to reply