diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-24 14:26:20 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-24 14:35:03 +0100 |
commit | 827d9a3be8209587c532f061753e99730b9be4c4 (patch) | |
tree | 95ef51b6773b4d9f2ef8b2ff999188bd96632a9c /src/qt/guiutil.cpp | |
parent | bc121b0eb19713ec72002b5be03ba5ac35903a17 (diff) |
qt: Replace NetworkToggleStatusBarControl with generic ClickableLabel
Generalize the clickable label functionality.
We will use this to add similar functionality to the sync icon.
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r-- | src/qt/guiutil.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 <QSettings> #include <QTextDocument> // for Qt::mightBeRichText #include <QThread> +#include <QMouseEvent> #if QT_VERSION < 0x050000 #include <QUrl> @@ -986,4 +987,10 @@ QString formateNiceTimeOffset(qint64 secs) } return timeBehindText; } + +void ClickableLabel::mousePressEvent(QMouseEvent *event) +{ + Q_EMIT clicked(event->pos()); +} + } // namespace GUIUtil |