PDA

View Full Version : set QHeaderView background image?



niklas
26th January 2010, 21:58
Hello
I want to set a background image for a QHeaderView.
Preferably through a stylesheet, if possible.

I can set background-color in a stylesheet, but background-image does not work.
This is what I've got right now:

QHeaderView::section
{
background-image:url(:/topgradient.png);
background-repeat:repeat-x;
}

Any ideas?

high_flyer
27th January 2010, 08:30
background-image:url(":/topgradient.png");

niklas
28th January 2010, 22:16
background-image:url(":/topgradient.png");

No, thats not it :(
I believe doing it without the quotes is valid syntax. I usually do it with them though, for good practice.
Any other ideas?

Kenni
19th February 2010, 22:44
you can do it with

border-image: url(treeWidget_header.png);

:)