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

RE: changing combobox items color? (Qt422)

Subject: RE: changing combobox items color? Qt422
From: "eric placoly"
Date: Tue, 27 Mar 2007 10:35:23 +0000
Hello,

I do not know if it is the best way but i should use the model/view facilities. You define your model inheriting from QAbstractListModel and by reimplementing QAbstractListModel::data() method, you can return the role you need to manage item background and text color ( Qt::BackgroundRole and Qt::TextColorRole ). Then you attach your model to the combo box thanks to setModel() method.

 Regards,

 Eric.


From: veronique.lefrere@xxxxxx
To: qt-interest@xxxxxxxxxxxxx
Subject: changing combobox items color? (Qt422)
Date: Tue, 27 Mar 2007 10:03:04 +0200

Hi,

Is there a possibility using stylesheet to control combox items color? (text color or background item color)?

if someone can give me the best way to do this?...

Thank you for any idea.

Veronique.

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


_________________________________________________________________
Gagnez des pc Windows Vista avec Live.com http://www.image-addict.fr/

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