Results 1 to 12 of 12

Thread: Add Gradient to Background for QListView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Add Gradient to Background for QListView

    Yeah,i have done that . But i am confused how to paint particular index of ListView.I have gone through the examples in demos.but not able to get how to get the index of ListView.Kindly throw some light on this.
    Last edited by vasant; 19th February 2010 at 07:06.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: Add Gradient to Background for QListView

    What did you try ? You get the index in paint function of the delegate.
    QStyledItemDelegate::paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index )

Similar Threads

  1. background gradient with stylesheets
    By martinn in forum Qt Programming
    Replies: 6
    Last Post: 28th February 2010, 15:37
  2. getting gradient colors
    By venkat.godavarthi in forum Qt Programming
    Replies: 1
    Last Post: 30th October 2009, 13:36
  3. Gradient in histogram
    By giusepped in forum Qwt
    Replies: 1
    Last Post: 1st August 2009, 11:48
  4. QPainter Gradient
    By ^NyAw^ in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2008, 12:53
  5. gradient background
    By drkbkr in forum Qt Programming
    Replies: 4
    Last Post: 30th March 2006, 16:10

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
  •  
Qt is a trademark of The Qt Company.