PDA

View Full Version : how to apply stylesheet to QListWidgetItem using .qss file?



namita
19th March 2008, 06:48
Hi,

I want to know how to apply stylesheet to QListWidgetItem using qss file.

I want to set background image of 1st list item. Want to change the image when i'll select that list item. Is it possible? If yes pls tell me how to do this. Also pls tell me if i can set max number of items of a QListWidget.

Thanks in advance,
Namita

wysota
19th March 2008, 06:52
To use stylesheets on items you need Qt 4.4. Otherwise your only choices are a custom delegate or changing the model data. I'd suggest going for the custom delegate approach, it's really easy to do what you want.

namita
20th March 2008, 04:51
Hi,

Can you pls explain how to go about custom delegate approach?

Thanks in advance,
Namita

wysota
20th March 2008, 10:22
Please search the forum on custom delegate.

namita
28th March 2008, 04:55
Hi,

I want to know how can I apply stylesheet to atopia application using qss file.
I want to run this application on green phone emulator. Where should I save .qss file.
I tried to run one of my developed qt application on emulator, but the images are missing.

Pls help me.

Thanks in advance,
Namita