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:
@@ -274,10 +274,10 @@ PyObject* CommandPy::getAction(PyObject *args)
|
||||
if (group) {
|
||||
const auto actions = group->actions();
|
||||
for (auto a : actions)
|
||||
list.append(wrap.fromQObject(a));
|
||||
list.append(wrap.fromQAction(a));
|
||||
}
|
||||
else if (action) {
|
||||
list.append(wrap.fromQObject(action->action()));
|
||||
list.append(wrap.fromQAction(action->action()));
|
||||
}
|
||||
|
||||
return Py::new_reference_to(list);
|
||||
|
||||
Reference in New Issue
Block a user