Gui: Implement PythonWrapper::fromQAction

Wrapping QAction through QObject does not work as QAction class
is a part of QtGui not QtCore, so Py::Object with internal
pointer being null is returned causing a crash later.
Therefore implement fromQAction conversion method.
This commit is contained in:
Ladislav Michl
2024-02-24 02:21:30 +01:00
committed by wwmayer
parent fe70801fc2
commit 61bca92941
4 changed files with 28 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ Py::Object CommandActionPy::getAction()
PythonWrapper wrap;
wrap.loadWidgetsModule();
return wrap.fromQObject(action->action());
return wrap.fromQAction(action->action());
}
else {
return Py::None();