[Development] qsizetype and classes working with QStrings or QList
Matthew Woehlke
mwoehlke.floss at gmail.com
Tue Aug 25 19:34:05 CEST 2020
On 25/08/2020 01.24, Philippe wrote:
> But then there would be the need to make QAbstractSlider be able to
> handle 64 bit quantities too.
Well, since you mentioned it:
https://github.com/Kitware/qtextensions/blob/master/widgets/qtDoubleSlider.h
No, that isn't a two-headed slider, it's a slider that works on
`double`. Doesn't derive from QAbstractSlider because it can't.
These are hardly uncommon; GIMP has tons of examples, for instance, in
many, many filter options dialogs (although the widget they use isn't
entirely like QSlider). Yes, you can sort-of emulate them with integers
under the hood, but doing so adds an annoying level of dissonance to the
code.
Q[Abstract]Slider being limited to `int` is indeed an irritation. We
have QDoubleSpinbox, why not QDoubleSlider?
--
Matthew
More information about the Development
mailing list