Results 1 to 3 of 3

Thread: Inserting progress bar as an item

  1. #1
    Join Date
    Feb 2010
    Posts
    68
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Inserting progress bar as an item

    Hi, i'm working on the p2m client. I've got a table which represents files that are currently downloaded. One of the table's columns is "Progress". I want to have a progress bar in this columns, which would indicate how many percent of the file size has been already downloaded. I just don't know how to put something like QProgressBar object as a table's item. That's what I want to ask you about .

  2. #2
    Join Date
    Aug 2006
    Posts
    221
    Thanks
    3
    Thanked 29 Times in 19 Posts

    Default Re: Inserting progress bar as an item

    Search through the torrent example in Qt examples. This rudimentary bittorrent client is exactly doing that using a delegate.

  3. #3
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Inserting progress bar as an item

    The simplest and most efficient is to subclass QStyledItemDelegate and draw progress bar with QStylePainter - look at its and QStyle's reference (drawControl() is probably the method you want.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  4. The following user says thank you to faldzip for this useful post:

    kremuwa (23rd July 2010)

Similar Threads

  1. Inserting Record
    By Nefastious in forum Newbie
    Replies: 3
    Last Post: 20th October 2009, 04:28
  2. Inserting PDF metadata
    By Randria in forum Qt Programming
    Replies: 2
    Last Post: 18th May 2009, 10:18
  3. Inserting Table
    By dreamer in forum Qt Programming
    Replies: 5
    Last Post: 16th May 2008, 10:10
  4. Replies: 4
    Last Post: 11th March 2008, 11:44
  5. Inserting Item to a QTreeWidget from Thread?
    By vishal.chauhan in forum Qt Programming
    Replies: 3
    Last Post: 23rd June 2007, 11:23

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.