Results 1 to 12 of 12

Thread: Add Gradient to Background for QListView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 47 Times in 43 Posts

    Default Re: Add Gradient to Background for QListView

    hi

    for gradient use this stylesheet
    for blue color
    Qt Code:
    1. t->setStyleSheet("background-color: qlineargradient(x1: 0.5, y1: 0.5 x2: 0.5, y2: 1, stop: 0 #6666FF, stop: 0.7 #99CCFF );");
    To copy to clipboard, switch view to plain text mode 

    for green color
    Qt Code:
    1. t->setStyleSheet("background-color: qlineargradient(x1: 0, y1: 0 x2: 0, y2: 1, stop: 0 #00CD00 , stop: 0.2 #0AC92B stop: 1 #00FF33 );");
    To copy to clipboard, switch view to plain text mode 

    not exactly as qtcenter. but its a green gradient

    hope it helps
    Bala
    Last edited by BalaQT; 18th February 2010 at 11:34.

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.