1111
23rd March 2009, 11:28
Hi all,
I made my custom widget based on QWidget, just several button and labels. How to set style sheet from my custom widget?
I set object name for widget
myWidget->setObjectName("myWidget");
and wrote small style sheet
QWidget#myWidget {
color: red;
}
but nothing happened. :o
The reason why I want to do it this way is because I want to have something like this in the future:
QWidget#myWidget > QPushButton {
color: red;
}
I made my custom widget based on QWidget, just several button and labels. How to set style sheet from my custom widget?
I set object name for widget
myWidget->setObjectName("myWidget");
and wrote small style sheet
QWidget#myWidget {
color: red;
}
but nothing happened. :o
The reason why I want to do it this way is because I want to have something like this in the future:
QWidget#myWidget > QPushButton {
color: red;
}