summaryrefslogtreecommitdiffstats
path: root/examples/widgets/widgets/lineedits
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/widgets/lineedits')
-rw-r--r--examples/widgets/widgets/lineedits/window.cpp3
-rw-r--r--examples/widgets/widgets/lineedits/window.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/examples/widgets/widgets/lineedits/window.cpp b/examples/widgets/widgets/lineedits/window.cpp
index ffb1edc5ce..47324589b7 100644
--- a/examples/widgets/widgets/lineedits/window.cpp
+++ b/examples/widgets/widgets/lineedits/window.cpp
@@ -53,7 +53,8 @@
#include "window.h"
//! [0]
-Window::Window()
+Window::Window(QWidget *parent)
+ : QWidget(parent)
{
QGroupBox *echoGroup = new QGroupBox(tr("Echo"));
diff --git a/examples/widgets/widgets/lineedits/window.h b/examples/widgets/widgets/lineedits/window.h
index 2070b3b84c..3231588f4f 100644
--- a/examples/widgets/widgets/lineedits/window.h
+++ b/examples/widgets/widgets/lineedits/window.h
@@ -64,7 +64,7 @@ class Window : public QWidget
Q_OBJECT
public:
- Window();
+ Window(QWidget *parent = nullptr);
public slots:
void echoChanged(int);