[Ctk-developers] ctkRangeSlider, ctkDoubleRangeSlider and others inherited QAbstractSlider with a negative minimum value
Wagner Sales
wsales at gmail.com
Thu Oct 14 23:02:37 UTC 2010
Hi Julien,
I think the behavior are fine too. But a comment will save time from
newbies ( or may be not a newbie too ;) ).
Thanks,
Wagner Sales
2010/10/6 Julien Finet <julien.finet at kitware.com>:
> Hi Wagner,
> Thanks for your feedback. The behavior you encounter with ctkRangeSlider is
> normal, it is the exact same behavior than QSlider (or QxtSpanSlider): you
> can't set the value of an handle before making sure that it will be inside
> the slider bounds (setMinimum/setMaximum).
> Qt Designer solves the issue by following the order of the properties in the
> header of a C++ class.
> To have a correct behavior when using Qt Designer, the "Minimum" and
> "Maximum" properties (Q_PROPERTY) are defined before the
> "MinimumValue"/"MaximumValue" properties.
> I wouldn't change anything in the code. The behavior seems fine to me. I
> would prefer adding a warning in the comments.
> Feel free to submit a patch with more documentation. Otherwise, I'll do it.
> Thanks,
> Julien.
> On Wed, Oct 6, 2010 at 6:32 PM, Ron Kikinis <kikinis at bwh.harvard.edu> wrote:
>>
>> good catch relative to Hounsfield units.
>>
>> On 10/6/2010 10:47 AM, Wagner Sales wrote:
>>>
>>> Hi all,
>>>
>>> After taking a look for a couple of minutes in range sliders which
>>> inherits from QAbstractSlider I see a ( i think ) problem: you cannot
>>> start setting the minimum value as a negative value. Instead, you'll
>>> needs to set minimum by QAbstractSlider::setMinimum(negative value)
>>> and after ctkRangeSlider::setMinimumValue(negative value). Only to
>>> point: this occurs in QxtSpanSlider too ( of course not the topic here
>>> )!. What can be done about this? Change the behavior? Document in the
>>> class? A warning in the method? Well, since I spent some time to found
>>> this, I think others don't need to spent too. ;)
>>>
>>> Best Regards,
>>>
>>> Wagner Sales
>>> _______________________________________________
>>> Ctk-developers mailing list
>>> Ctk-developers at commontk.org
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>>
>>
>> --
>> Ron Kikinis, M.D.,
>> Robert Greenes Distinguished Director of Biomedical Informatics
>> Professor of Radiology, Harvard Medical School
>> Director, Surgical Planning Laboratory
>> http://www.spl.harvard.edu/~kikinis
>> _______________________________________________
>> Ctk-developers mailing list
>> Ctk-developers at commontk.org
>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>
>
More information about the Ctk-developers
mailing list