PDA

View Full Version : Child widgets disturb style sheet



Cruz
23rd January 2009, 12:29
Hello,

Take a QFrame, define the rigth styles for it and then you get a nice visual effect, when the mouse hovers over the frame.



QFrame {
border-width: 1px;
border-style: solid;
}

QFrame:hover {
border-width: 2px;
}


The problem is, if you fill the QFrame with some children widgets that cover the frame, the mouse will not trigger the QFrame:hover style. Any ideas what I can do about this?

nifei
23rd January 2009, 14:52
I don't think the parent can receive the hover event when any child responses it. So the frame won't change.

Install an event filter might be useful, i suppose.