Support any QObject in QUiLoader.load function.
Fix bug #392. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
parent
846c9a151f
commit
7633675d11
1 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
#include <shiboken.h>
|
#include <shiboken.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_populate_parent(PyObject* pyParent, QWidget *parent)
|
_populate_parent(PyObject* pyParent, QObject *parent)
|
||||||
{
|
{
|
||||||
if (parent->children().isEmpty())
|
if (parent->children().isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
@ -21,7 +21,7 @@ _populate_parent(PyObject* pyParent, QWidget *parent)
|
||||||
PyObject_SetAttrString(pyParent, qPrintable(name), pyChild);
|
PyObject_SetAttrString(pyParent, qPrintable(name), pyChild);
|
||||||
|
|
||||||
Shiboken::setParent(pyParent, pyChild);
|
Shiboken::setParent(pyParent, pyChild);
|
||||||
_populate_parent(pyChild, qobject_cast<QWidget*>(child));
|
_populate_parent(pyChild, qobject_cast<QObject*>(child));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue