Results 1 to 4 of 4

Thread: My derived TableView - how to get data mouse is over

  1. #1
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default My derived TableView - how to get data mouse is over

    Hi,

    I have promoted a TableView widget to my own custom widget. I override the QAbstractItemView::viewportEvent in order to capture tooltips. What I want to do now is to display a QToolTip when this event is raised, but want to know how to get the item I am hovering over in the table, this possible?

    Regards,
    Steve

  2. #2
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: My derived TableView - how to get data mouse is over

    Hi,

    I can work out the mouse position using QHelpEvent pos method, but how can I get the row, col within the table view?

    Thanks,
    Steve

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: My derived TableView - how to get data mouse is over

    J-P Nurmi

  4. #4
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: My derived TableView - how to get data mouse is over

    Thanks JPN, so obvious!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.