PDA

View Full Version : StyleSheet and paintEvent()



T4ng10r
7th September 2009, 12:30
Hi.
My widget has his own paintEvent where, depending on some variable I draw different figures (ellipse or rect).
So I though that I'll configure drawing params and colors from styleSheet. But somehow it doesn't won't to work. Heres my css.

RP3DevicePaint {
border-width: 2px;
border-style: solid;
border-color: black;
background: white;
}

PS. Is there possibility to set widget figure (like circle or rectangle) from within css?

wysota
7th September 2009, 13:10
You can't use stylesheets with custom widgets. Unless of course you call QStyle to do the base class work.