-
Notifications
You must be signed in to change notification settings - Fork 44
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
Update GzSpinBox to use the SpinBox QML module from QtQuick.Controls2 #654
Conversation
The SpinBox module from QtQuick.Controls1 has been deprecated in Qt5 and removed in Qt6. The new SpinBox has a different API and does not directly support floating point values. The workaround in this PR is to store the floating point numbers in a fixed-point representation. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #654 +/- ##
==========================================
+ Coverage 68.49% 68.72% +0.23%
==========================================
Files 38 38
Lines 5567 5544 -23
==========================================
- Hits 3813 3810 -3
+ Misses 1754 1734 -20 ☔ View full report in Codecov by Sentry. |
code changes look good to me. I noticed an issue that when expanded the ![]() Also not sure if it's possible to make the |
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
This leaves more real estate for the numbers and addresses a reviewer feedback where the down button overlapped with the number. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
I've addressed your feedback in 7330c06 and actually got it to look like the SpinBox from the previous version. 8eae434 cleans up some warnings related to bindings. |
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.
nice, works well for me
Toward #586
Summary
The SpinBox module from QtQuick.Controls1 has been deprecated in Qt5 and removed in Qt6. The new SpinBox has a different API and does not directly support floating point values. The workaround in this PR is to store the floating point numbers in a fixed-point representation.
The implementation was inspired by the example in https://doc.qt.io/qt-5/qml-qtquick-controls2-spinbox.html
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.