Results 1 to 2 of 2

Thread: Custom progress bar background for list items

  1. #1
    Join Date
    Sep 2011
    Posts
    20
    Qt products
    Qt5
    Platforms
    Windows

    Default Custom progress bar background for list items

    I'd like to draw a custom background for items in a table widget that shows a visual representation of some progress. Maybe some pseudocode will explain it better:

    Qt Code:
    1. CustomProgressBar pb;
    2. pb.setColor(LIGHT_GREEN); // set progress bar color to light green
    3. pb.setHeight(100); // consume 100% of space vertically
    4. pb.setWidth(30); // consume 30% of space horizontally
    5. pb.setAutoResize(true); // resize progress bar if parent item is resized
    6.  
    7. newItem->setBackground(pb);
    8. newItem->setText("My Movie Watchlist (30% Completed)");
    To copy to clipboard, switch view to plain text mode 

    Here's what it's supposed to look like with HTML/CSS: http://jsfiddle.net/wShQR/

    What do I need in order to do this?

    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: Custom progress bar background for list items

    A custom delegate.
    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: 1
    Last Post: 23rd April 2011, 17:33
  2. Replies: 1
    Last Post: 29th November 2010, 17:22
  3. Qt Kinetic: adding items to list
    By Diph in forum Qt Programming
    Replies: 1
    Last Post: 10th November 2009, 08:27
  4. Comparing Items In List Box
    By kenny_isles in forum Qt Programming
    Replies: 9
    Last Post: 21st February 2007, 13:06
  5. delete items from list box
    By vvbkumar in forum Qt Programming
    Replies: 4
    Last Post: 23rd June 2006, 19:08

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.