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. QGraphicsItem::hoverEnterEvent & entering a QGraphicsItem WITHOUT moving the mouse

QGraphicsItem::hoverEnterEvent & entering a QGraphicsItem WITHOUT moving the mouse

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.2k Views 2 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.
  • P Offline
    P Offline
    Pippin
    wrote on last edited by Pippin
    #1

    Hello,

    If the cursor enters some QGraphicsItem because the user moved his mouse, QGraphicsItem::hoverEnterEvent is called. But if the cursor enters the QGraphicsItem because an animation moved that QGraphicsItem towards the cursor, QGraphicsItem::hoverEnterEvent isn't called. Is there a simple way to fix that?

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

      Hi,

      Not really because currently the mouse is not hovering since it doesn't move. What you can do is some "collision detection" while your item is moving so if the cursor is over it do the same thing as it hovered it.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • P Offline
        P Offline
        Pippin
        wrote on last edited by
        #3

        @SGaist Thank you!

        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