Results 1 to 2 of 2

Thread: How to paint row & column differently on cell mouse hover in QTableView.

  1. #1
    Join Date
    May 2011
    Posts
    7
    Qt products
    Qt4

    Default How to paint row & column differently on cell mouse hover in QTableView.

    In QTableView when user does mouse hover on cell, I want to show row and column to which this hovered cell belongs with different background color.

    For Example:

    HoveringInTable.JPG

    Any idea on implementing this will help.

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to paint row & column differently on cell mouse hover in QTableView.

    Implement a custom delegate for your table that will paint rows and columns based on mouse position and force update of the whole table when mouse pointer enters a new cell.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 26
    Last Post: 7th January 2016, 20:26
  2. QTableView paint row in stylesheet hover
    By estanisgeyer in forum Qt Programming
    Replies: 3
    Last Post: 23rd October 2012, 09:17
  3. Show text on mouse hover on plot
    By pkj in forum Qwt
    Replies: 1
    Last Post: 25th February 2011, 07:36
  4. Hover on mouse over while dragging
    By mooreaa in forum Qt Programming
    Replies: 3
    Last Post: 6th February 2010, 10:31
  5. segmentation fault on mouse hover
    By elessaar in forum Qt Programming
    Replies: 6
    Last Post: 26th August 2008, 12:51

Tags for this Thread

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.