[Qt-interest] SetStyleSheet on customcontrol with a another qwidget in it. How to?

Jens Saathoff jensesaat at googlemail.com
Wed Mar 2 01:18:39 CET 2011


Hi!

I'm trying to style my app via qt's stylesheet, a global stylesheet
for the application.

I have a class called "MainNavigation" and a class "NavigationButton",
"NavigationButton" has a layout with a Qlabel(innerText) for text and
a Qwidget(innerImage) as image.

Now i have an instance of NavigationButton, called naviButton1. I want
to set set "background-image" for containing QWidget "innerText".

My suggestion/idea was the following:

MainNavigation#naviButton1#innerImage
{
	background-image: url(styles/default/images/options_button.png);
	background-color: red;
	min-height: 32px;
	max-height: 32px;
	min-width: 32px;
	max-width: 32px;
}

That does not work. Any ideas how to get it working?



More information about the Qt-interest-old mailing list