Materials: Fix QT6 error
The MaterialTreeWidget was not working in QT6 due to a type check for a QT5 widget
This commit is contained in:
committed by
Chris Hennes
parent
ca7b7fe5a0
commit
9df2ec7b86
@@ -68,7 +68,8 @@ int MaterialTreeWidgetPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
|
||||
PyErr_Clear();
|
||||
if (PyArg_ParseTuple(args, "O", &obj)) {
|
||||
if (QLatin1String(obj->ob_type->tp_name) == QLatin1String("PySide2.QtWidgets.QWidget")) {
|
||||
if ((QLatin1String(obj->ob_type->tp_name) == QLatin1String("PySide2.QtWidgets.QWidget")) ||
|
||||
(QLatin1String(obj->ob_type->tp_name) == QLatin1String("PySide6.QtWidgets.QWidget"))) {
|
||||
Gui::PythonWrapper wrap;
|
||||
wrap.loadWidgetsModule();
|
||||
auto qObject = wrap.toQObject(Py::Object(obj));
|
||||
|
||||
Reference in New Issue
Block a user