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

Widgets react to all mouse buttons when using Qt backend #4975

Closed
notfirefox opened this issue Mar 28, 2024 · 1 comment · Fixed by #5010
Closed

Widgets react to all mouse buttons when using Qt backend #4975

notfirefox opened this issue Mar 28, 2024 · 1 comment · Fixed by #5010
Labels
a:backend-qt The Qt backend - including the qt style (mO,bS) bug Something isn't working good first issue Good for newcomers

Comments

@notfirefox
Copy link
Contributor

Steps to reproduce
The issue can be reproduced on Linux using the example gallery application.

  1. git clone https://github.com/slint-ui/slint
  2. cd examples/gallery
  3. cargo run

Expected behavior
Components such as

  • Button
  • Checkbox
  • LineEdit
  • SpinBox
  • Tab

should not react with the primary action when someone presses any mouse button that is not
the left mouse button, e.g. the Button widget is not supposed to be clicked when someone right clicks.

Actual behavior
One can activate the Button using right click, one can select a Checkbox using mouse button 5, etc.

Platform
Fedora Linux 40, Rust, Qt Backend, Wayland

@ogoffart ogoffart added bug Something isn't working a:backend-qt The Qt backend - including the qt style (mO,bS) labels Mar 29, 2024
@ogoffart
Copy link
Member

Thanks for filling a bug report.
Indeed in the Qt Widget we don't check the MouseEvent's button as we should in the input_event function. For example for Button, in this function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:backend-qt The Qt backend - including the qt style (mO,bS) bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants