diff options
Diffstat (limited to 'tests/QtCore/qobject_parent_test.py')
-rw-r--r-- | tests/QtCore/qobject_parent_test.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/QtCore/qobject_parent_test.py b/tests/QtCore/qobject_parent_test.py index 4699fc60c..eb8cae2d8 100644 --- a/tests/QtCore/qobject_parent_test.py +++ b/tests/QtCore/qobject_parent_test.py @@ -71,6 +71,17 @@ class ParentCase(unittest.TestCase): for i, child in enumerate(children): self.assertEqual(child, parent.findChild(QObject, name % i)) + def testFindChildWithoutName(self): + parent = QObject() + name = 'object%d' + children = [QObject(parent) for i in range(20)] + + for i, child in enumerate(children): + child.setObjectName(name % i) + + child = parent.findChild(QObject) + self.assert_(isinstance(child, QObject)) + def testFindChildren(self): #QObject.findChildren() with all QObject parent = QObject() |