Nominate our 2022 Qt Champions!

QListView::iconMode - icons on top of icons

  • Hey guys,

    so a few days ago i have created a QListView as IconMode and i am adding my required data as icons to it. But now i want to have small overlay icons above my current icons.

    For example:
    I have an QLabel with an Icon set and i am displaying it in my ListView.
    This Icon should have a small icon (for example in the bottom right corner).
    How can i achieve this ?
    Is this small icon also able to be clicked ?

    Hope you have a great day and thanks for reading.

  • Lifetime Qt Champion


    QStyledItemDelegate comes to mind for that.

    You can re-implement the paint event to add your overlay.

    Hope it helps

Log in to reply