Python Bindings: Fix findParent that was not working as expected (#349)

This commit is contained in:
Nicolas Elie 2021-09-06 20:48:17 +02:00 committed by GitHub
parent b5b251dffb
commit 130b0de646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ PyObject *qtads_FindParent(PyObject* type, const QWidget *w)
return 0;
}
if (PyType_IsSubtype((PyTypeObject *)type, Py_TYPE(ParentImpl)))
if (PyObject_IsInstance(ParentImpl, type))
return ParentImpl;
Py_DECREF(ParentImpl);