Results 1 to 1 of 1

Thread: QStyledItemDelegate and QStyle::State_MouseOver

  1. #1
    Join Date
    Jul 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QStyledItemDelegate and QStyle::State_MouseOver

    Hello all
    I implemented myDelegate class that inherit QStyledItemDelegate.
    in the paint() i check if the index.columne is 2 do some painting
    when i run and hover a row all other columnes are marked as hover (by color)
    except the columne 2
    i try to use the following in the paint method
    if (option.state & QStyle::State_MouseOver)
    painter->fillRect(option.rect, Qt::red);
    and its colored the columne 2 in red and all other columne in the system hover color

    my question is how do i take/know the system color for the hover in the :aint

    if this post is Incomprehensible please let me know and i try to explain it with more details or code
    thanks a lot
    Last edited by moti.lahiani; 19th January 2011 at 12:28.

Similar Threads

  1. Replies: 2
    Last Post: 14th July 2011, 12:28
  2. Replies: 0
    Last Post: 11th November 2010, 13:05
  3. QStandardItem, QStyledItemDelegate, and QWebView
    By enlightened_j in forum Newbie
    Replies: 1
    Last Post: 16th August 2010, 08:44
  4. Question about subclassing QStyledItemDelegate
    By dpimka in forum Qt Programming
    Replies: 4
    Last Post: 10th July 2009, 17:09
  5. Setting Format in a QStyledItemDelegate
    By Airswoop1 in forum Qt Programming
    Replies: 0
    Last Post: 1st June 2009, 22:01

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.