I would like to create a custom widget in a QListView with an icon and a text like in the picture. Anybody could help me?? Thanks!
I would like to create a custom widget in a QListView with an icon and a text like in the picture. Anybody could help me?? Thanks!
Last edited by Faster; 27th June 2009 at 22:05. Reason: spelling error
I would to create something like the widget in the picture but I'm new with Qt4 and I don't know how I can do it! Any help?
It would be better if you posted in the newbie section if you consider yourself one...
Take a look at QStandardItemModel, QStandardItem::setText and QStandardItem::setIcon.
ok thanks!
I would to create something like the listWidget in the picture but I'm new with Qt4 and I don't know how I can do it! Any help?
Last edited by Faster; 27th June 2009 at 23:38. Reason: reformatted to look better
Please don't start multiple threads on the same subject. Threads merged.
How I could use QStandardItemModel to create this listView? Anybody could post an example please?
Last edited by Faster; 28th June 2009 at 10:29. Reason: spelling error
Yes! But I would to create a thing more complex using QItemDelegate like this http://www.qtcentre.org/forum/f-qt-p...thod-8660.html. I would display a custom resized image (jpg, png, bmp) and html text instead of plain text in a listView but I don't know how to use QItemDelegate. (sorry for my poor English).![]()
Learn the basics first. If you don't know how to use models then you won't be able to implement a delegate. The image you posted uses a standard delegate and the two roles I mentioned.
Bookmarks