[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Progress bar inside KListViewItem?
From:       Martin =?iso-8859-15?q?K=F6bele?= <martin () mkoebele ! de>
Date:       2004-04-16 21:03:57
Message-ID: 200404162303.57332.martin () mkoebele ! de
[Download RAW message or body]

On Thursday 15 April 2004 20:59, Nicos Gollan wrote:
> Hi all,
>
> is it somehow possible to make one column of a KListViewItem display a
> progress bar? I found some rather ugly hack to display a percentage by
> overwriting the paintCell() method to draw a fixed-color background, but
> that's not adapting to any style or theme.
>
> Since the columns are not widgets, I guess I'll have to somehow create a
> progress bar and draw it to the painter given to the paintCell() method,
> but I don't know hot to do that. The closest I've come yet was the
> QFrame::drawContents() method, but that's protected. The other problem
> is that I haven't found a way to pass the proper height and width to any
> paint method.
>
> Any hints?

hi,

we had the same problem for Apollon, the file sharing. Here we show the 
progress of downloading  in a listviewitem.

I had no success with grabing the widget and painting the pixmap. Looked very 
ugly and was slow. And the height and width of the item got screwed... :/

One of our team (David Sansome) overwrote paintCell. Overwrite it too and do a 
drawRect and fillRect. And you have lots of nice possibilities with gradient 
etc.

Martin
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic