Results 1 to 2 of 2

Thread: painter->fillRect(option.rect, palette.Window); Default bg app color

  1. #1
    Join Date
    Apr 2011
    Posts
    132
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default painter->fillRect(option.rect, palette.Window); Default bg app color

    Any idea how to make bg color of selected items in QtreeView in delegate ?
    I want actually not background at all for selected items or hovered.

    painter->fillRect(option.rect, palette.Window);

    this does not work
    thanls

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: painter->fillRect(option.rect, palette.Window); Default bg app color

    Hi, check option.state if it is QStyle::State_Selected

Similar Threads

  1. Circle color palette
    By binaural in forum Qt Quick
    Replies: 0
    Last Post: 1st February 2011, 21:30
  2. Incorrect option.rect in custom item delegate
    By Jarvis in forum Qt Programming
    Replies: 0
    Last Post: 16th April 2010, 23:48
  3. problem in painter fillRect
    By wagmare in forum Qt Programming
    Replies: 1
    Last Post: 27th May 2009, 13:43
  4. qt 4 color palette / style sheet question
    By killerwookie99 in forum Qt Programming
    Replies: 1
    Last Post: 6th November 2008, 23:05
  5. how to color the top edge of a rect
    By dreamer in forum Newbie
    Replies: 4
    Last Post: 15th May 2008, 14:15

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.