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

List:       kde-devel
Subject:    Re: Desktop search and multiline richtext-enabled listview items
From:       Michael Olbrich <michael-olbrich () web ! de>
Date:       2005-06-17 10:38:39
Message-ID: 20050617103839.GB20059 () a168 ! apm ! etc ! tu-bs ! de
[Download RAW message or body]

On Wed, Jun 15, 2005 at 09:45:55PM +0200, Thomas Lübking wrote:
> On Wednesday, 15. June 2005 21:14, Xavier Helluy wrote:
> > I would like to know if it is possible/will be possible with kde 4 to buil=
> > d what I would call an enhanced listview, where each listview item could d=
> > isplay multilines of  rich text.
> Tried to inherit QListViewItem and reimplement the paint() (height() / ... 
> maybe key()) function?

It's not that easy. The dynamic linebreak makes the calculation of the
height rather difficult. At least if you are trying to break at word
boundaries. I tried it once and it was way to slow for >100 items. I'm
sure what I did wasn't the fastest solution, but the general problem
exists.
One idea I just had: QListViewItem can static line breaks. Don't
reimplement the painting but setup() and text() and insert the
linebreaks where needed.

Michael

 
>> 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