-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add QLineEdit support to UISliderWidget #168
base: main
Are you sure you want to change the base?
Conversation
Updated PR title to reflect changes to the design of the UISliderWidget class. Following discussions with @paskino and @DanicaSTFC, it was agreed that instead of a QDoubleSpinBox the UISliderWidget class would make better use of a QLineEdit, removing restrictions on the decimal values users can input. |
update docstrings
Updated examples to include the UISliderWidget. Also corrected the issue causing the KeyErrors in each example, see #178 |
is_application parameter
Following conversation with @lauramurgatroyd, decided the best course of action would be to re-add the To set up the GitHub Actions to run the GUI tests would require substantial work, perhaps we can look into adding this functionality in a separate PR. |
Closes #125 #60 #178
The current UISliderWidget is limited due to the following factors:
This pull request originally removed the QLabel parameter in favour of a QDoubleSpinBox parameter. It was decided that to provide the best user experience and enable flexibility to modify the widget in the future, more changes would be required:
test_UISliderWidget.py
/examples/
folder have been updated to accommodate the updated UISliderWidgetNote
By default the
QSlider.value()
method only returns integer values - even if the value of the QLineEdit is a float/double, this value is automatically converted to an integer when the QSlider value is updated. Additional methods have been implemented to convert the QSlider value into a scaled QLineEdit value, and vice versa. This means the QSlider can now accurately represent float/double values.Current Tasks:
Overload the init, one with the DSpinBox and one without