4 Attachment(s)
Implementing Spotify's volume slider with QSlider.
Hi everyone, this is my first post!
So, I'm trying to create a volume slider similar to the one found in the desktop version of Spotify on Windows. I'm posting images showing the behaviors I'm interested in if you are not familiar with Spotify. As you see when you hover the sub-page is turning green and the handle appears. So my issues are 2.
1) Can't turn green the sub-page on QSlider::sub-page:hover.
2) Can't show the handle only on QSlider::groove:hover.
I don't know if it is doable with setStyleSheet(), but I prefer it over having to subclass QSlider. I'm happy to post the relevant code if you want, though I believe that I can't set background on sub-page.
Re: Implementing Spotify's volume slider with QSlider.
Stylesheets are deprecated. It's very easy to do what you want by drawing a custom slider.
Re: Implementing Spotify's volume slider with QSlider.
Quote:
Stylesheets are deprecated.
@wysota: Welcome back. Can you please provide a link? I'm not finding anything in the online documentation of obsolete / deprecated classes that references style sheets.
Re: Implementing Spotify's volume slider with QSlider.
Thanks. It's deprecated not in terms that they are going to vanish any time soon. I can't give you a docs link, I think my info is based on some other source (blog, DevDays presentation? Can't remember right now). One way or another this technology is not developed anymore and there are many pieces missing there so it's hardly usable for anything more advanced than making a red push-button.