There are many postings online about trying to make a double range slider
The most common answer I found is to use libqxt
. However, going to the website it clearly states it is not maintained due to internal api changes with newer versions of Qt
.
Does Qt5
provide any new functionality for this, or is there a longer lasting Qt
implementation that provides this functionality without requiring large external libraries?
If Qt Quick is an option, Qt Quick Controls 2 has a RangeSlider
(in three different styles). The module has tech preview status in Qt 5.6, but is a proper module in 5.7.
Here's the Default style RangeSlider
:
From what I have read there are only two ways to go about getting a double range slider.
You can use Qt4 and download libqxt. Libqxt already has that feature implemented so it shouldn't be too hard if you know how to use Qt4.
http://qt-project.org/doc/qt-4.8/widgets-codeeditor.html
^That doesn't explain how to use double sliders, but it may help you figure out ho to draw two sliders on top of each other.
You can also use that same technique to draw the colors in between the two values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With