PDA

View Full Version : StyleSheet and QScrollBar



fruzzo
27th April 2010, 10:41
Hi,
I have to customize my QMotifStyle GUI in order to change the style of widgets (colors and fonts).
I decide to use the styelsheet approach instead of the creation of MyStyle (inherited by QMotifStyle ) but now I've a problem releated to QScrollBar. They change "shape"...setting colors I lose up-down arrows too...why? How can I avoid this behaviour?

Note: I try to change the QMotifStyle in other QStyle but I've the same behaviour!

jpn
27th April 2010, 16:40
My suggestion: Lookup "Qt Style Sheet Examples" in the Qt Reference Documentation. Take a properly working example style sheet as a base and start modifying it for your needs.

fruzzo
28th April 2010, 08:10
My suggestion: Lookup "Qt Style Sheet Examples" in the Qt Reference Documentation. Take a properly working example style sheet as a base and start modifying it for your needs.

I've just lookup "Qt Style Sheet Examples" and about QScrollBar it suggest that if one property or sub-control is customized, all the other properties or sub-controls must be customized as well.

At this point..How can I keep the default aspect of left-arrow and right-arrow according to the QMotifStyle or QWindowsStyle?

Basically you can see what I don't want simply using this style sheet:

QWidget {
background-color: rgb(255, 0, 0);
color: rgb(0, 0, 0);
}

fruzzo
30th April 2010, 08:28
any idea about the problem?