PDA

View Full Version : customize the groove of qslider



oscar_chen
13th May 2010, 08:26
Hi, all!

I want to design a customized qslider, the groove of which is rendered in two parts. Each part is in a different color. I find the following css code


QSlider::add-page:horizontal {
background: white;
}

QSlider::sub-page:horizontal {
background: navy;
}

However, I want the separation position of the groove not decided by the handle, but by some specific value within the range of slider itself, and the seperation position can change in the running program. Please help me.

Regards,
Oscar

sevketk
9th October 2023, 20:38
Hi, all!

I want to design a customized qslider, the groove of which is rendered in two parts. Each part is in a different color. I find the following css code


QSlider::add-page:horizontal {
background: white;
}

QSlider::sub-page:horizontal {
background: navy;
}

However, I want the separation position of the groove not decided by the handle, but by some specific value within the range of slider itself, and the seperation position can change in the running program. Please help me.

Regards,
Oscar

If you create an image for the qslider groove and add it as the groove' background.