diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /examples/corelib/tools/customtypesending/window.cpp | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'examples/corelib/tools/customtypesending/window.cpp')
-rw-r--r-- | examples/corelib/tools/customtypesending/window.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/corelib/tools/customtypesending/window.cpp b/examples/corelib/tools/customtypesending/window.cpp index 224656f94c..db4b52a985 100644 --- a/examples/corelib/tools/customtypesending/window.cpp +++ b/examples/corelib/tools/customtypesending/window.cpp @@ -52,14 +52,15 @@ #include "window.h" //! [Window constructor] -Window::Window() +Window::Window(QWidget *parent) + : QWidget(parent), editor(new QTextEdit(this)) { - editor = new QTextEdit(); QPushButton *sendButton = new QPushButton(tr("&Send message")); - connect(sendButton, SIGNAL(clicked()), this, SLOT(sendMessage())); + connect(sendButton, &QPushButton::clicked, + this, &Window::sendMessage); - QHBoxLayout *buttonLayout = new QHBoxLayout(); + QHBoxLayout *buttonLayout = new QHBoxLayout; buttonLayout->addStretch(); buttonLayout->addWidget(sendButton); buttonLayout->addStretch(); |