qt-interest@trolltech.com
[Top] [All Lists]

Re: Re: Qt::DecorationRole not requested from QListView

Subject: Re: Re: Qt::DecorationRole not requested from QListView
From: "Patrick Stinson"
Date: Mon, 6 Nov 2006 15:28:01 -0900
this was a dumb mistake. I forgot that I had swtiched to a QListWidget
and was populating it myself. oops! Yes, QItemDelegate asks for it by
default..

thanks for the response....

On 11/6/06, Bill KING <bill.king@xxxxxxxxxxxxx> wrote:
Patrick Stinson wrote:
> I have a QListView that displays data from a custom list model. Why
> doesn't the listview ask for Qt::DecorationRole?  Is there some
> attribute I have to set on the model? I want the listview it to show
> icons as it does if I set it to use a QDirModel.
>
> cheers!
>
If you're using a custom delegate, check that paint calls data
requesting the decoration role, otherwise, probably need more info, as
I'm using a QListView with custom models here with no problem at all
(and even proxy models too, that wrap existing models to portray the
data in a different form).

--
Bill King, Software Engineer
Trolltech, Brisbane Technology Park
26 Brandl St, Eight Mile Plains,
QLD, Australia, 4113
Tel + 61 7 3219 9906 (x137)
Fax + 61 7 3219 9938
mobile: 0423 532 733




--
Patrick Kidd Stinson
http://www.patrickkidd.com/
http://pkaudio.sourceforge.net/
http://pksampler.sourceforge.net/

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>