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

CombBox: Don't change on scroll uless we have focus #7485

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

ogoffart
Copy link
Member

This is what native Windows combobox does.
Otherwise this causes problem when combobox are in scrollable

Fixes #5929

@ogoffart ogoffart requested a review from NigelBreslaw January 28, 2025 10:47
Copy link
Member

@NigelBreslaw NigelBreslaw left a comment

Choose a reason for hiding this comment

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

At least on MacOS there are no situations you can scroll the values of a combo box. Focused or not. However with either keyboard or mouse once the combo box is opened and showing the list of values those can be scrolled. I just tested on Windows 11 and it seems the same? You have to open the combo box list of items first via a click or keyboard activation. At least in the system settings pages I tried.

@ogoffart
Copy link
Member Author

I just tested on Windows 11 and it seems the same? You have to open the combo box list of items first via a click or keyboard activation. At least in the system settings pages I tried.

I Just tested in the system settings and when the ComboBox has the keyboard focus, and you scroll over it with the mouse wheel, it does change its values.

@ogoffart
Copy link
Member Author

According to https://doc.qt.io/qt-6/qstyle.html#:~:text=SH_ComboBox_AllowWheelScrolling , Qt also disable the wheel on the combobox on mac, so i've disabled it for the cupertino style

@ogoffart ogoffart requested a review from FloVanGH January 30, 2025 07:39
This is what native Windows combobox does.
Otherwise this causes problem when combobox are in scrollable

Fixes #5929
@ogoffart ogoffart requested a review from tronical February 7, 2025 08:28
@ogoffart ogoffart merged commit 9853384 into master Feb 7, 2025
37 checks passed
@ogoffart ogoffart deleted the olivier/fix-#5929 branch February 7, 2025 12:52
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.

Allow disabling combobox value changing with scrolling
3 participants