I need something like a range slider (a slider that has two handles for setting min/max values).
I noticed that there is a RangeSlider in QtQuick and QML (Whatever that is), but there is not a 'standard widget' such as QRangeSlider.
Why is this?
Can I use that RangeSlider from QtQuick without writing QML code?
In my project I successfully used the Common TK range slider.
It looks like this:

Practical class ready to go here: CPP and header
Since RangeSlider is a QML type you need QML context to use it in. QQuickWidget is just a QWidget that specializes in loading and displaying QML contents. The fact that it's just another subclass of it enables you to integrate it into a QWiget of your choice. See here for an example of how to integrate these two (the example uses QMainWindow but you can adapt it to your needs.
My guess for this missing UI component in a standard QWidget would be that:
QSlider (example)QSpinBoxes etc.Better solution would be to dump the QML stuff for this and implement your own version in C++.
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