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

QVTKRenderWindowInteractor.py _emit_wheel_event() will produce a NameError QWheelEvent undefined. #1276

Open
chrisgmorton opened this issue Sep 18, 2023 · 1 comment

Comments

@chrisgmorton
Copy link

chrisgmorton commented Sep 18, 2023

The import of QWheelEvent from QtGui was accidentally dropped with 502c3f0.

The current logic in __init__ implies this is also only needed for Qt4 (if is_qt4:...). However, 539aba1 also seems to break scrollwheel zooming for PySide2 (I'm running a modified version of 5.15.10 to support Python 3.11 with VTK 9.3.0.rc1 on Ubuntu 20.04).
We need the QWheelEvent import for the PySide2 case too and updated logic:

if is_qt4 or PyQtImpl == 'PySide2': 
    ..

This addresses the zooming for PySide2 and I assume avoids the NameError with PySide and PyQt4.

@chrisgmorton chrisgmorton changed the title QVTKRenderWindowInteractor.py _emit_wheel_event() will produce a name error QWheelEvent undefined. QVTKRenderWindowInteractor.py _emit_wheel_event() will produce a NameError QWheelEvent undefined. Sep 19, 2023
@chnce
Copy link

chnce commented Dec 7, 2023

I have the same /a related issue. Zooming with the scroll wheel does not work (no error).

Windows 11
python 3.11.6 h2628c8c_0_cpython conda-forge
mayavi 4.8.1 py311hd333e61_7 conda-forge
pyside2 5.15.8 py311h2411a93_2 conda-forge

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

No branches or pull requests

2 participants