-
Notifications
You must be signed in to change notification settings - Fork 40
Use scientific notation for big values in labeled slider #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #226 +/- ##
==========================================
- Coverage 87.14% 86.80% -0.35%
==========================================
Files 49 49
Lines 3774 3835 +61
==========================================
+ Hits 3289 3329 +40
- Misses 485 506 +21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
basic idea looks good. lemme know when ready for a full review. How do you plan to manage when it switches into scientific notation? |
Currently, it depends on str(float), as for big values, on my machine it uses scientific notation. I need to check how universal it is. |
hey @Czaki, gentle ping on this PR. still interested in adding this? |
Yes. But I'm not sure if I will find time before January (Christmas etc). |
K, no hurry. Enjoy |
Hi @Czaki, Here are what I found.
so, I think your choice of using Thank you. -- Jake |
@tlambert03 may you take a look on the implementation of Maybe the minimum and maximum limits should be more flexible: superqt/src/superqt/sliders/_labeled.py Lines 679 to 683 in 358d041
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may you take a look on the implementation of setValue to tell what did you think about the logic to converting to string?
seems reasonable to me i think? Maybe a few more tests would help clarify whether it's doing what you want?
Maybe the minimum and maximum limits should be more flexible:
sure, seems reasonable
src/superqt/sliders/_labeled.py
Outdated
self.editingFinished.connect(self._silent_clear_focus) | ||
self._update_size() | ||
|
||
def _editig_finished(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo _editig_finished -> _editing_finished
Closes #224
Use
QLabel
instead ofQDoubleSpinBox
for custom representation of big/small values.