Qt-interest Archive, July 2007
QComboBox items
Message 1 in thread
Hello,
I am creating a combo-box for color selection.
For every item in the comboBox I want to
1. Give it a background Color and change fonts of the texts.
2. Organise items in a matrix (both horizontally and vertically).
Can I do this with QComboBox. I did not see any member function that
helps me do that ?
Can someone please point me to the right direction ?
Thnx
Prateek
Message 2 in thread
You'll have to create a custom model, override the data method, handle the Qt::BackgroundColorRole data request, and set the new model as the model for the COmboBox (which is just a view)
Scott
________________________________________
From: Prateek Tiwari [mailto:ptiwari@xxxxxxxxxxx]
Sent: Tuesday, July 03, 2007 2:19 AM
To: Qt Interest List
Subject: QComboBox items
Hello,
I am creating a combo-box for color selection.
For every item in the comboBox I want to
1. Give it a background Color and change fonts of the texts.
2. Organise items in a matrix (both horizontally and vertically).
Can I do this with QComboBox. I did not see any member function that helps me do that ?
Can someone please point me to the right direction ?
Thnx
Prateek
--
[ signature omitted ]