We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8559272 + da2dc60 commit 93b7515Copy full SHA for 93b7515
modmesh/view.py
@@ -52,6 +52,15 @@
52
try:
53
from _modmesh import view as _vimpl # noqa: F401
54
enable = True
55
+ # Before using _modmesh mianWindow api, the QMainWindow signature need
56
+ # to be imported or will get type error:
57
+ # TypeError: Unable to convert function return value to a Python type!
58
+ # Creating variable to handle Qt MainWindow which is created by c++ and
59
+ # registered it to Shiboken6 to prevent runtime error occured:
60
+ # RuntimeError:
61
+ # Internal C++ object (PySide6.QtGui.QWindow) already deleted.
62
+ from PySide6.QtWidgets import QMainWindow # noqa: F401
63
+ _main_window = _vimpl.RManager.instance.mainWindow
64
except ImportError:
65
pass
66
0 commit comments