summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qobject.cpp23
1 files changed, 23 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 086c62893d..11b70cc1ab 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
@@ -448,6 +448,29 @@ QListWidget *list = parentWidget->findChild<QListWidget *>(QString(), Qt::FindDi
QList<QPushButton *> childButtons = parentWidget.findChildren<QPushButton *>(QString(), Qt::FindDirectChildOnly);
//! [43]
+//! [44]
+QLabel *label = new QLabel;
+QLineEdit *lineEdit = new QLineEdit;
+QObject::connect(lineEdit, &QLineEdit::textChanged,
+ label, &QLabel::setText);
+//! [44]
+
+//! [45]
+void someFunction();
+QPushButton *button = new QPushButton;
+QObject::connect(button, &QPushButton::clicked, someFunction);
+//! [45]
+
+//! [46]
+QByteArray page = ...;
+QTcpSocket *socket = new QTcpSocket;
+socket->connectToHost("qt-project.org", 80);
+QObject::connect(socket, &QTcpSocket::connected, [=] () {
+ socket->write("GET " + page + "\r\n");
+ });
+//! [46]
+
+
//! [meta data]
//: This is a comment for the translator.