Skip to content

Qt: Handle middle mouse button#76

Merged
gselzer merged 1 commit intopyapp-kit:mainfrom
gselzer:qt-middle-mouse-button
Apr 24, 2026
Merged

Qt: Handle middle mouse button#76
gselzer merged 1 commit intopyapp-kit:mainfrom
gselzer:qt-middle-mouse-button

Conversation

@gselzer
Copy link
Copy Markdown
Collaborator

@gselzer gselzer commented Apr 24, 2026

Somehow, the middle mouse button was handled for wx and jupyter but not for qt 😦

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds missing Qt support for the middle mouse button so Qt behavior matches the existing wx/jupyter implementations.

Changes:

  • Map Qt.MouseButton.MiddleButton to MouseButton.MIDDLE in the Qt event filter.
  • Expand the Qt mouse press test to cover left, right, and middle buttons via parametrization.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/scenex/app/_qt.py Adds middle-button mapping in QtEventFilter.mouse_btn so Qt generates MouseButton.MIDDLE events.
tests/app/test_qt.py Updates test_mouse_press to parametrically validate left/right/middle press events are emitted correctly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.09%. Comparing base (53b9f95) to head (5a36472).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #76   +/-   ##
=======================================
  Coverage   88.08%   88.09%           
=======================================
  Files          64       64           
  Lines        3182     3184    +2     
=======================================
+ Hits         2803     2805    +2     
  Misses        379      379           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gselzer gselzer merged commit 48c0a80 into pyapp-kit:main Apr 24, 2026
75 of 76 checks passed
@gselzer gselzer deleted the qt-middle-mouse-button branch April 24, 2026 17:18
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.

2 participants