Is it possible to change the color of a QSlider's handle according to its position?
<p>I pretty well understood how to customize a QSlider through style sheets, but I am wondering if it is possible to do the following thing:</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://i.stack.imgur.com/3br1d.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3br1d.png" alt="enter image description here"></a></p>

<p>I'd like the handle of the slider to go from blue to yellow. When set on the left, it's blue; and when you move it to the right, it will have a gradient from blue to yellow.</p>

<p><strong>If it is possible through the style sheets, how?</strong> And if not, <strong>how can I implement that in the paintEvent of a subclass of a QSlider?</strong></p>