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. Read cursor position as it changes using `HoverHandler`?
Qt 6.11 is out! See what's new in the release blog

Read cursor position as it changes using `HoverHandler`?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 992 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.
  • K Offline
    K Offline
    kaixoo
    wrote last edited by
    #1

    Hi,

    I'm building an application using QtQuick/QML and I require getting an updated position of the cursor relative to my widget as it changes (user hovers the cursor) to update some UI stuff. (I'm using QQuickFramebufferObject).

    I tried to use HoverHandler, but the only signals it has are grabChanged and canceled and none example covers my simple use case.

    1 Reply Last reply
    0
    • GrecKoG Offline
      GrecKoG Offline
      GrecKo
      Qt Champions 2018
      wrote last edited by
      #2

      HoverHandler has a point property which has a position property.

      Alternatively since you are implementing your QQFBO in c++ you can override hoverMoveEvent and handle it there (after calling setAcceptHoverEvents).

      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