spraff
26th November 2008, 19:26
I just tried this:
void SomeWidget :: enterEvent (QEvent *) {
setStyleSheet ("background-color: red");
}
void SomeWidget :: leaveEvent (QEvent *) {
setStyleSheet (QString());
}
The widget's background color is not set, its children's background colours are!
How do I prevent the stylesheet from being inherited?
I've been trying to use the backgroundRole property instead -- to no effect. I need a solution in stylesheets for other reasons.
Thanks a lot, the folks on this forum have been a great help so far. :p
void SomeWidget :: enterEvent (QEvent *) {
setStyleSheet ("background-color: red");
}
void SomeWidget :: leaveEvent (QEvent *) {
setStyleSheet (QString());
}
The widget's background color is not set, its children's background colours are!
How do I prevent the stylesheet from being inherited?
I've been trying to use the backgroundRole property instead -- to no effect. I need a solution in stylesheets for other reasons.
Thanks a lot, the folks on this forum have been a great help so far. :p