summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2011-08-15 13:24:23 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-15 13:37:49 +0200
commit3a1568c30c80c3681edaeaa472fe9c684ab48454 (patch)
tree9cfb0e82bb66664db1c817983cb11985edd0db4a /doc/src/snippets/code/src_corelib_kernel_qobject.cpp
parentc74aa533837bda15bf049d4135bd18f952c5229f (diff)
Add flag for non-recursive lookup of child qobject(s)
Merge-request: 40 Reviewed-by: olivier Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Change-Id: I1194ba0d8bba92ece3132171e230cece341ec127 Reviewed-on: http://codereview.qt.nokia.com/2957 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'doc/src/snippets/code/src_corelib_kernel_qobject.cpp')
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qobject.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
index afb9460983..086c62893d 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
@@ -434,6 +434,21 @@ hostNameLabel->setText(tr("Name:"));
QString example = tr("Example");
//! [40]
+//! [41]
+QPushButton *button = parentWidget->findChild<QPushButton *>("button1", Qt::FindDirectChildOnly);
+//! [41]
+
+
+//! [42]
+QListWidget *list = parentWidget->findChild<QListWidget *>(QString(), Qt::FindDirectChildOnly);
+//! [42]
+
+
+//! [43]
+QList<QPushButton *> childButtons = parentWidget.findChildren<QPushButton *>(QString(), Qt::FindDirectChildOnly);
+//! [43]
+
+
//! [meta data]
//: This is a comment for the translator.
//= qtn_foo_bar