• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jni / vispy / 12291385307 / 1
70%
master: 70%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 12 Dec 2024 07:08AM UTC
Files 344
Run time 10s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Nov 2024 03:17PM UTC coverage: 68.685% (+0.005%) from 68.68%
12291385307.1

push

github

web-flow
Add modifiers to QT native gesture events (#2631)

### Why this PR?

Mouse Events forwarded from QT to the canvas events have a `modifers`
attribute that is very useful to create enhanced interactions. For
instance it can be used to make CONTROL + zoom behave like a slower zoom
to better manipulate the camera.

Sadly when the QT event is a NativeGesture event, the current qt backend
(_qt.py) does not forward this list of modifiers.

This PR fixes this so that we can have access to the modifiers when
handling a QT native gesture event in vispy.

### What are the changes?

This PR just adds a `modifiers` attribute to these events, exactly as
it's done with the classic mouse events. It works the same because
QNativeGestureEvent inherits from QInputEvent
(https://doc.qt.io/qtforpython-6/PySide6/QtGui/QInputEvent.html#PySide6.QtGui.QInputEvent)
that has the `modifiers` method.

### About the tests

I couldn't find any test about the forwarding of QT events so I didn't
change any specific test in this PR

### Note

For the moment QT does not forward the keys pressed to the `modifiers`
of the QNativeGestureEvents but :
- the interface exists on the QT side (the method `modifiers` exists)
- it allows for a more homogenous interface on vispy side (mouse events
& gesture events share a better interface)
- QT will hopefully fill in the modifiers in QNativeGestureEvents in a
future update: better be ready ;)

5529 of 10539 branches covered (52.46%)

Branch coverage included in aggregate %.

23739 of 32073 relevant lines covered (74.02%)

0.74 hits per line

Source Files on job run-2 - 12291385307.1
  • Tree
  • List 344
  • Changed 10
  • Source Changed 0
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 12291385307
  • 85c4bf94 on github
  • Prev Job for on main (#9266685178.2)
  • Next Job for on main (#14532569852.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc