From 827d9a3be8209587c532f061753e99730b9be4c4 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 24 Nov 2016 14:26:20 +0100 Subject: qt: Replace NetworkToggleStatusBarControl with generic ClickableLabel Generalize the clickable label functionality. We will use this to add similar functionality to the sync icon. --- src/qt/guiutil.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/qt/guiutil.cpp') diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 130cfc6e7d..b2e8119299 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -55,6 +55,7 @@ #include #include // for Qt::mightBeRichText #include +#include #if QT_VERSION < 0x050000 #include @@ -986,4 +987,10 @@ QString formateNiceTimeOffset(qint64 secs) } return timeBehindText; } + +void ClickableLabel::mousePressEvent(QMouseEvent *event) +{ + Q_EMIT clicked(event->pos()); +} + } // namespace GUIUtil -- cgit v1.2.3