Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 830
    • Issues 830
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 240
    • Merge requests 240
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTKVTK
  • Issues
  • #17867
Closed
Open
Issue created Apr 24, 2020 by Eric Larson@larsonerContributor

Python QGLWidget interactor hangs on VTK9 RC3 wheels on Linux with PyQt < 5.14.1

Minimal example, fails for VTK9 RC3 wheels on (at least) PyQt5 5.12, 5.13.2, and 5.14.1 (EDIT: on linux):

import vtkmodules.qt
vtkmodules.qt.QVTKRWIBase = 'QGLWidget'
from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
from vtkmodules.vtkRenderingUI import vtkGenericRenderWindowInteractor
from PyQt5.QtWidgets import QApplication, QMainWindow

app = app = QApplication([''])
window = QMainWindow()
interactor = QVTKRenderWindowInteractor(parent=window)
assert isinstance(interactor, QVTKRenderWindowInteractor)
interactor_gen = interactor.GetRenderWindow().GetInteractor()
assert isinstance(interactor_gen, vtkGenericRenderWindowInteractor)
interactor_gen.Initialize()  # hangs on Linux + PyQt 5.13.2

It works:

  • If I change the QVTKRWIBase to QWidget
  • On PyQt 5.14.1 or above
  • On macOS with 5.13.2

So it seems to be something about the combination of QGLWidget + Linux + PyQt5 < 5.14.2.

Edited Apr 24, 2020 by Eric Larson
Assignee
Assign to
Time tracking