[Qt-interest] SetStyleSheet on customcontrol with a another qwidget in it. How to?
sarvesh saran
aquarian.thunder at gmail.com
Wed Mar 2 05:32:38 CET 2011
Hi,
make sure you call setObjectName() on all your instances...
let us assume QWidget(innerImage) has an object name "innerImage"
you can try...
QWidget#innerImage {
.....
.....
}
let me know if i works..
thanks,
Sarvesh
On Wed, Mar 2, 2011 at 5:48 AM, Jens Saathoff <jensesaat at googlemail.com>wrote:
> 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?
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110302/f228ce9c/attachment.html
More information about the Qt-interest-old
mailing list