Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved hovered widget selection

    General and Desktop
    signals&slots mouseevent
    2
    3
    784
    Loading More Posts
    • 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.
    • geor
      geor last edited by

      I want to get the position of a hovered widget instead of clicked widget I was using this fucntion

                 layout->indexOf(clicked_widget);
      

      to get the index of the widget but I would like to do it in a infinite while loop with the mousse move event so instead of the clicked widget what should I use ? Is there a hovered widget function because I could not find it.

      THANK YOU

      Ni.Sumi 1 Reply Last reply Reply Quote 0
      • Ni.Sumi
        Ni.Sumi @geor last edited by

        @geor

        you can do this with an event handler with the QEvent::HoverMove /Enter/Leave

        http://doc.qt.io/qt-4.8/qhoverevent.html#details

        geor 1 Reply Last reply Reply Quote 1
        • geor
          geor @Ni.Sumi last edited by

          @Ni.Sumi my prolem is that I am using qmouse event to display coordinates on a widget but I want it only when the cursor is on a specific widget . even thought my connect signals is on that widget the function that shows the coordinates is still active outside that widget and it show random usles stuff

          1 Reply Last reply Reply Quote 0
          • First post
            Last post