Skip to content

Crash with OpenGL only window trying to create some Qt widget #442

Description

@paskino

Potentially, this should be fixed with #440

On the toolbar3d branch I was exploring a dataset then I clicked probably letf or centre click with a modifier. The whole thing crashed with the following error:

>>> v.startRenderLoop()
QWidget: Must construct a QApplication before a QWidget

I did not have any Qt application running, nor should an interaction with the viewer spawn a QWidget.

Code to reproduce (requires a META image file, like https://github.com/TomographicImaging/CIL-Data/raw/refs/heads/main/head.mha), plus (furiously) click.

reader = vtk.MetaImageReader()
reader.SetFileName('myfilename.mha')
reader.Update()

from ccpi.viewer import viewer2D

v = viewer2D()
v.setInputData(reader.GetOutput())
v.startRenderLoop()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions