PDA

View Full Version : QSlider and qint64 values



kemp
14th October 2007, 20:06
Halo!

Does anyone know how to make QSlider to take qint64 values?

marcel
14th October 2007, 20:19
You can't do it, unless if you don't rewrite QSlider or maybe subclass it and rewrite the functions in question.

Another solution is to trick it. For example if you want the slider to go from 0 to 2^64-1 then you can set the real bounds from 0 to 100 and just compute the real in64 value from that. At 20 you would have (2^64 - 1)/20.