New Moon
New Moon

Reputation: 817

Qt - How to Draw an Icon Image to a QListWidgetItem

I have QListWidget, in that I had added the items. i had made the QListWidgetItems to scroll from right to left in a QWidget. Now i want to add a Icon image before every item that is Scrolling in the QWidget. How to draw an Icon image in a QWidget ? Plz help me with your Solutions. Thanks in Advance.

Upvotes: 0

Views: 553

Answers (1)

Valentin H
Valentin H

Reputation: 7458

Why not trying QListWidgetItem::setIcon( QIcon & ) ?

Use QListWidgetItem * QListWidget::item ( int row ) iterating from 0 to QListWidget::count() for setting to all existing items in QListWidget.

Upvotes: 2

Related Questions