Custom role in custom QAbstractTableModel
Hello,
i have a customized QAbstractTableModel and in the lines of a column i want to display an QIcon and a QImage and some text, side by side. Im using Qt::DecorationRole for the QIcon and Qt::DisplayRole for the text, but i don't really know how can i include the QImage too. Any help? I tried to create a custom role, but i couldn't make it work :T
Re: Custom role in custom QAbstractTableModel
You don't create custom roles, you just use them. You need to provide a delegate that will be aware of your custom role and will render it to the item.
Re: Custom role in custom QAbstractTableModel
Okay... how do i make this delegate?
Re: Custom role in custom QAbstractTableModel
Well... you implement it.