PDA

View Full Version : Skype style list.



bunjee
29th January 2007, 12:43
Hey guys,

I would like to create a QListWidget like the one in Skype :

http://bunjeee.free.fr/skypeBar.jpg

Basically it's a standard list,
when clicking on a cell it expands to show some neat informations about the user.

Any idea on how should I best proceed ? Class reimplementation ? Where should I start ?

Thanks.

e8johan
29th January 2007, 13:06
I'd say that you want to implement a delegate for drawing list items in a list view. This means that you want to look at QAbstractItemDelegate.

wysota
29th January 2007, 13:15
If it expands upon click you might also do it with a tree view.

bunjee
29th January 2007, 13:37
The way that I see it, it's some kind of "special" QListView.

Except that when you click on one item it expands in one "widget" with several buttons and infos.

So I guess my question is :
how to make fit a fully featured widget in a QListView ?

wysota
29th January 2007, 15:49
You can use setIndexWidget to do that. But remember that Skype uses Qt3 and we're talking about Qt4, so there are differences. I wouldn't stick a widget there, but go for the delegate approach as already suggested. You can do it with both QListView or QTreeView, the choice is yours.