Hello
I have some lines passed in a QListWidget using listWidget->addItem ( dog ),listWidget->addItem ( cat ) etc..
Can someone tell me how can i add a picture near the text??
Thanks!
Hello
I have some lines passed in a QListWidget using listWidget->addItem ( dog ),listWidget->addItem ( cat ) etc..
Can someone tell me how can i add a picture near the text??
Thanks!
see the QTDIR\examples\itemviews\stardelegate\ example.
or QTDIR\demos\interview\
not helpful..i have the pictures already in the resources.qrc.Just need a method to display them in the listwidget as items..any hint?
Qt Code:
{ if (!index.isValid()) if (role == Qt::DecorationRole) return qVariantFromValue(services); }To copy to clipboard, switch view to plain text mode
there is no need to pass the images through index..
the code is like
Qt Code:
... //just need to construct 3 image items here list->addItem(dog); list->addItem(cat); list->addItem(lion); //and pass them here for every animalTo copy to clipboard, switch view to plain text mode
maybe this code will help
Qt Code:
lw->addItem(itm);To copy to clipboard, switch view to plain text mode
mekos (4th August 2008)
You're very helful today my friend thanks!
Do you know how to resize a specified column in a treeview?
read more about this method
Qt Code:
To copy to clipboard, switch view to plain text mode
and
Qt Code:
To copy to clipboard, switch view to plain text mode
Bookmarks