The behaviour is different using larray 0.34 and 0.34.1, but bad in both cases.
When using 0.34, since there is a Qt application left over by matplotlib, but no Window is detected, view() shows the window but closes it immediately. Even without plt.show() it seems like the Qt application is created and thus the viewer is closed immediately. When using 0.34.1, it seems to work fine if we do not actually show the window via plt.show() but with it, it crashes with:
Traceback (most recent call last):
File "<whatever>", line 41, in main
view(arr)
File "[...]\lib\site-packages\larray\viewer\__init__.py", line 30, in view
view(obj, title, depth + 1)
File "[...]\lib\site-packages\larray_editor\api.py", line 388, in view
_show_dialog("Viewer", create_edit_dialog, obj=obj, title=title, readonly=True, depth=depth + 1)
File "[...]\lib\site-packages\larray_editor\api.py", line 47, in _show_dialog
dlg = create_dialog_func(parent, *args, **kwargs)
File "[...]\lib\site-packages\larray_editor\api.py", line 179, in create_edit_dialog
dlg = ArrayEditor(parent)
File "[...]\lib\site-packages\larray_editor\editor.py", line 1163, in __init__
AbstractEditor.__init__(self, parent, editable=True)
File "[...]\lib\site-packages\larray_editor\editor.py", line 92, in __init__
QMainWindow.__init__(self, parent)
TypeError: QMainWindow(parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()): argument 1 has unexpected type 'QWindow'
Test case:
The behaviour is different using larray 0.34 and 0.34.1, but bad in both cases.
When using 0.34, since there is a Qt application left over by matplotlib, but no Window is detected, view() shows the window but closes it immediately. Even without plt.show() it seems like the Qt application is created and thus the viewer is closed immediately. When using 0.34.1, it seems to work fine if we do not actually show the window via
plt.show()
but with it, it crashes with: