Skip to content
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

Fix support normalized ranges for Slider with Qt style #3010

Merged
merged 1 commit into from Jun 28, 2023

Conversation

tronical
Copy link
Member

The OpenGL Texture import example uses a Slider in the range 0..1. That doesn't work with QStyleOptionSlider out of the box because it's
using integer values.

@tronical tronical requested a review from ogoffart June 28, 2023 12:57
Comment on lines +43 to +47
option.maximum = maximum * 1024;
option.minimum = minimum * 1024;
int value = float_value * 1024;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this deserve a comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right.

The OpenGL Texture import example uses a Slider in the range 0..1. That doesn't work with
QStyleOptionSlider out of the box because it's
using integer values.
@tronical tronical merged commit 07f42af into master Jun 28, 2023
5 checks passed
@tronical tronical deleted the simon/qt-slider-range branch June 28, 2023 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants