Thanks guys. I ended up using the name of my widget for the stylesheet and that worked OK.
Thanks guys. I ended up using the name of my widget for the stylesheet and that worked OK.
How to do the same in DESIGN MODE?
What do you mean?
The style sheet is not aware in which "mode" you are.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
I have Frame. I drop Button on it.
Now I want Frame to have border-style: solid und border-width: 5px. I click on Frame->Change styleSheet... and write it there. I have what I want. Frame have solid border with 5px width. BUT, button have the same.
Ok.
Now I want button to have it's DEFAULT values for border-style and border-width. I want for this button to switch off StyleSheet inheritance.
No, you don't. You want the stylesheet to apply to one particular widget. Use a selector that will apply to this widget and not to the button, for example:
... or ...css Code:
.QFrame { border-style: solid; border-width: 5px; }To copy to clipboard, switch view to plain text mode
css Code:
#myFrameName { border-style: solid; border-width: 5px; }To copy to clipboard, switch view to plain text mode
Chiz (13th January 2011)
Bookmarks