Closed tlambert03 closed 6 months ago
Attention: Patch coverage is 77.77778%
with 12 lines
in your changes are missing coverage. Please review.
:exclamation: No coverage uploaded for pull request base (
main@12f10be
). Click here to learn what that means.
Files | Patch % | Lines |
---|---|---|
src/superqt/sliders/_labeled.py | 71.05% | 11 Missing :warning: |
src/superqt/sliders/_generic_slider.py | 80.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR fixes a variety of issues I've encountered, mostly with labeled sliders:
QApplication.processEvents()
in the labeled sliders. When using this slider in one of my applications, I was observing some very strange behavior. Gradually, by removing things piece by piece, I was able to narrow it down to these calls toprocessEvents()
in the slider. The calls are there because, without them, if you interactively do something like.setEdgeLabelMode(wdg.EdgeLabelMode.NoLabel)
, it will leave the handle labels in a slightly odd position, until the next time the widget is updated (which is likely to be very soon, or at least the next time the slider is touched/moved). I will try to figure out how to fix that moment of unstyled view, but the consequences of callingprocessEvents
are probably even worse, and much harder to debug (since it can have a global effect, but no one would know where it's coming from).LabelPosition.LabelsOnHandle
enum that results in the labels being placed directly ON a slider handle. It's not always useful, but it can save space if you're also using a custom stylesheet.ensure_main_thread