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

Re: Icons without text in a QHeaderView

Subject: Re: Icons without text in a QHeaderView
From: Andreas Pakulat
Date: Mon, 3 Apr 2006 11:50:13 +0200
On 03.04.06 09:29:39, Martin Gebert wrote:
> Andreas Pakulat schrieb:
> >I have a slight problem here with a QHeaderView for a QTableView. I'd
> >like to have the HeaderView display only the icon for 2 of the columns and
> >thus I'm returning a QVariant(QPixmap) for the DecorationRole in these 2
> >columns but nothing for the DisplayRole.
> >Question now is: Should this work, because it doesn't here, the headers
> >are empty.
> 
> It' supposed to work for QIcon, I'm not sure about QImage and QPixmap 
> though...

Thanks, that works perfectly. 

BTW: I find it a bit irritating that data() is allowed to return a
QPixmap, while headerData() needs to return a QIcon..

Andreas

-- 
You will soon meet a person who will play an important role in your life.

--
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>