You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When both handles of a QRangeSlider have the same value, i.e. slider.value() = (10,10), the clickable handle is the lower of the two handles (_pressedIndex = 0). When they both take the value of 0, i.e. slider.value() = (0,0), this makes it impossible to click and drag the handles. They can still be moved by either clicking in the slider, which will move the upper handle by pageStep, or scrolling, which moves both (and tends to add some distance between them, which seems like a separate bug).
To Reproduce
Steps to reproduce the behavior:
Run rangeSliderTest.py
Scroll within the bottom left range slider (styled_range_hslider) such that the whole range moves to the farthest left point (styled_range_hslider.value()[0] = 0)
Drag the upper handle as far left as possible, such that it overlaps the lower handle. It seems to be a feature that the two handles will not take the same value. This results in styled_range_hslider.value() = (0,1). Though, in custom apps this is not necessarily true when the handles can be moved programatically or through interaction with a QSPinBox, for example.
Try to click+drag the upper handle to expand the range and nothing happens because self.sender()._pressedIndex = 0
This behaviour can also be reproduced with the multi_range_hslider.
Expected behavior
In the instance where both handles overlap at an arbitrary position, this behaviour is fine; however, when the upper handle size is large enough to overlap the lower handle and slider.minimum(), the default _pressedIndex should give preference to the upper handle.
Screenshots
N/A
Desktop (please complete the following information):
Windows 10 Enterprise 21H2
PyQt5 v5.15.9
Python v3.10.4
The text was updated successfully, but these errors were encountered:
thanks for reporting this @bryandesser. I can reproduce it and I see what you mean.
until it gets fixed, I wanted to note that in that situation, you can "grab" the upper handle by clicking anywhere to the right of it (see movie, where clicking on the handle itself displays what you showed... but clicking to the right works fine):
Describe the bug
When both handles of a
QRangeSlider
have the same value, i.e.slider.value() = (10,10)
, the clickable handle is the lower of the two handles (_pressedIndex = 0
). When they both take the value of 0, i.e.slider.value() = (0,0)
, this makes it impossible to click and drag the handles. They can still be moved by either clicking in the slider, which will move the upper handle bypageStep
, or scrolling, which moves both (and tends to add some distance between them, which seems like a separate bug).To Reproduce
Steps to reproduce the behavior:
rangeSliderTest.py
styled_range_hslider
) such that the whole range moves to the farthest left point (styled_range_hslider.value()[0] = 0
)styled_range_hslider.value() = (0,1)
. Though, in custom apps this is not necessarily true when the handles can be moved programatically or through interaction with aQSPinBox
, for example.self.sender()._pressedIndex = 0
multi_range_hslider
.Expected behavior
In the instance where both handles overlap at an arbitrary position, this behaviour is fine; however, when the upper handle size is large enough to overlap the lower handle and
slider.minimum()
, the default_pressedIndex
should give preference to the upper handle.Screenshots
N/A
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: