You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

jsullivan

Beginner

  • "jsullivan" is male
  • "jsullivan" started this thread

Posts: 31

Location: Kennebunk, Maine, USA

Occupation: CTO, Nexus Management

  • Send private message

1

Friday, February 27th 2004, 7:26pm

QListViewItem with text and background color

A posting on the qt-interest mail list asked how to change the background color of a QCheckListItem. These are the derived classes I use to change the colors in a QListViewItem. I'm sure one could derive similarly from QCheckListItem. I'm pretty new at this so there may be much better ways to do this!
jsullivan has attached the following file:
If you are interested in helping to develop a GPL'd, enterprise class network security administration tool, please visit http://iscs.sourceforge.net

jsullivan

Beginner

  • "jsullivan" is male
  • "jsullivan" started this thread

Posts: 31

Location: Kennebunk, Maine, USA

Occupation: CTO, Nexus Management

  • Send private message

2

Friday, February 27th 2004, 7:27pm

Header file

Hmm . . . looks like we can only attach one file at a time. Here is the header file.
jsullivan has attached the following file:
If you are interested in helping to develop a GPL'd, enterprise class network security administration tool, please visit http://iscs.sourceforge.net

e8johan

Professional

  • "e8johan" is male

Posts: 1,195

Location: Sweden

  • Send private message

3

Friday, February 27th 2004, 8:18pm

Details about doing this (fancy listview and listbox items) can be found at Qt Quarterly, http://doc.trolltech.com/qq/qq08-fancy-list-view.html.

Markus Grunwald

Unregistered

4

Monday, March 1st 2004, 10:09am

RE: QListViewItem with text and background color

Unfortunately, this approach is not possible for QCheckIstitems, because the checkbox itself doesn't use any of the color groups.

There is, however one possiblilty that is not documented IMHO: setting a QBrush for the painter in paintCell gives a colorfull checkbox. But since this is not documented, it could change anytime :(