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. hovered widget selection
Forum Updated to NodeBB v4.3 + New Features

hovered widget selection

Scheduled Pinned Locked Moved Unsolved General and Desktop
signals&slotsmouseevent
3 Posts 2 Posters 1.1k 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.
  • georG Offline
    georG Offline
    geor
    wrote on last edited by
    #1

    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.SumiN 1 Reply Last reply
    0
    • georG geor

      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.SumiN Offline
      Ni.SumiN Offline
      Ni.Sumi
      wrote on last edited by
      #2

      @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

      georG 1 Reply Last reply
      1
      • Ni.SumiN Ni.Sumi

        @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

        georG Offline
        georG Offline
        geor
        wrote on last edited by
        #3

        @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
        0

        • Login

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