aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-09-12 14:54:04 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-09-12 14:54:23 +0200
commit7e1c87460163f4ca368b827afab87935efd24e09 (patch)
tree887b6cc404c1a19fd5a48cd2d58ffead7f23d30c /sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
parent0187d2b17dd5d35d645b70a2cf08c7100c0d6a14 (diff)
parent70d241713ae375124eaabdd928fcdfd034822c6e (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'sources/pyside2/PySide2/QtCore/typesystem_core_common.xml')
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_common.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
index 75056ea06..e2f943437 100644
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
+++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
@@ -2322,6 +2322,19 @@
<inject-code class="native" file="glue/qobject_findchild.cpp"/>
<add-function signature="findChild(PyTypeObject*,const QString&amp;)" return-type="PyObject*">
+ <inject-documentation format="target" mode="append">
+ To find the child of a certain QObject, the first argument of this function should be the child's type, and the second the name of the child:
+
+ ::
+
+ ...
+ parent = QWidget()
+ ...
+ # The first argument must be the child type
+ child1 = parent.findChild(QPushButton, "child_button")
+ child2 = parent.findChild(QWidget, "child_widget")
+
+ </inject-documentation>
<inject-code class="target" position="beginning">
QObject *child = _findChildHelper(%CPPSELF, %2, (PyTypeObject*)%PYARG_1);
%PYARG_0 = %CONVERTTOPYTHON[QObject*](child);
@@ -2334,6 +2347,9 @@
</modify-argument>
</add-function>
<add-function signature="findChildren(PyTypeObject*,const QString&amp;)" return-type="PySequence*" >
+ <inject-documentation format="target" mode="append">
+ Like the method *findChild*, the first parameter should be the child's type.
+ </inject-documentation>
<inject-code class="target" position="beginning">
%PYARG_0 = PyList_New(0);
_findChildrenHelper(%CPPSELF, %2, (PyTypeObject*)%PYARG_1, %PYARG_0);