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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions