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. Control Mouse with Qt
Qt 6.11 is out! See what's new in the release blog

Control Mouse with Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 891 Views 1 Watching
  • 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.
  • poohiaP Offline
    poohiaP Offline
    poohia
    wrote on last edited by
    #1

    Hello,
    I want do a simulation of click, double click, scroll of mouse .
    Can you give me a tips or some class i'll need for do that .

    Thanks

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi and welcome
      You can use QTest module

      QTest::mouseMove ( myWidget, QPoint( 70, 100 ), -1 );
      QWidget *btn = myWidget->childAt(70, 100);
      if (btn) {
      QTest::mouseClick ( btn, Qt::LeftButton, Qt::NoModifier, QPoint( 70, 100 ), 100);
      }

      If you goal is an auto clicker of some sort then a tool like
      Autoit3 will be much faster for such task.

      1 Reply Last reply
      2

      • Login

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