Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. is there any option to move cursor move from x to y position pro-grammatically
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 283 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    deleted157
    wrote on last edited by deleted157
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on last edited by
      #2

      [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?

      D 1 Reply Last reply
      1
      • B Bonnie

        [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?

        D Offline
        D Offline
        deleted157
        wrote on last edited by deleted157
        #3
        This post is deleted!
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved