summaryrefslogtreecommitdiffstats
path: root/examples/widgets/widgets/tooltips
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-02 14:17:21 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-13 16:57:05 +0000
commit588bd92228efa7ed3a92929e0eb90c22be189e04 (patch)
treeb92c71975554764161cddeacac9e14824f7a4c5f /examples/widgets/widgets/tooltips
parentfd83e03e7f634cda97ab793d67deb0e0b2377562 (diff)
Cleanup Widgets examples - parent ctor
Cleanup the Widgets examples - add missing parent parameter Change-Id: I5cd7aa333dbb8e6e4b7b9e05c085120733da83ec Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/widgets/widgets/tooltips')
-rw-r--r--examples/widgets/widgets/tooltips/sortingbox.cpp3
-rw-r--r--examples/widgets/widgets/tooltips/sortingbox.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/examples/widgets/widgets/tooltips/sortingbox.cpp b/examples/widgets/widgets/tooltips/sortingbox.cpp
index 4769a30c64..766815e8e9 100644
--- a/examples/widgets/widgets/tooltips/sortingbox.cpp
+++ b/examples/widgets/widgets/tooltips/sortingbox.cpp
@@ -55,7 +55,8 @@
#include "sortingbox.h"
//! [0]
-SortingBox::SortingBox()
+SortingBox::SortingBox(QWidget *parent)
+ : QWidget(parent)
{
//! [0] //! [1]
setMouseTracking(true);
diff --git a/examples/widgets/widgets/tooltips/sortingbox.h b/examples/widgets/widgets/tooltips/sortingbox.h
index 2ac27614a5..12bdeff1f6 100644
--- a/examples/widgets/widgets/tooltips/sortingbox.h
+++ b/examples/widgets/widgets/tooltips/sortingbox.h
@@ -67,7 +67,7 @@ class SortingBox : public QWidget
Q_OBJECT
public:
- SortingBox();
+ SortingBox(QWidget *parent = nullptr);
protected:
bool event(QEvent *event) override;