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. How to detect when a mouse hover leaves an item?
Forum Updated to NodeBB v4.3 + New Features

How to detect when a mouse hover leaves an item?

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

    I can detect when the mouse hovers over an item on my TreeView with a TreeView delegates paint method like this ......

    if (option.state & QStyle::State_MouseOver) {  ... }
    

    Is there a way to detect when the mouse hover leaves the item?

    jsulmJ 1 Reply Last reply
    0
    • S SRaD

      I can detect when the mouse hovers over an item on my TreeView with a TreeView delegates paint method like this ......

      if (option.state & QStyle::State_MouseOver) {  ... }
      

      Is there a way to detect when the mouse hover leaves the item?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @SRaD

      if (!(option.state & QStyle::State_MouseOver))
      

      ?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      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