PDA

View Full Version : QSlider - How to change tick color?



asc139
20th January 2014, 10:15
Hi,

I'm looking for a way to change tick colors for a QSlider which uses TicksBothSides.
Can anyone tell me how to do this (hopefully without having to reimplement the paintEvent()).

Best,
asc

high_flyer
20th January 2014, 13:07
Did you try to use QPalette? (with QPalette::WindowText)

Ginsengelf
20th January 2014, 13:36
Hi, you can also try style sheets: example (http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qslider)

Ginsengelf

edit: it seems like you cannot change the tick color using style sheets.