aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-06-08 16:48:45 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-07-03 18:29:24 +0300
commitbd315eb5e27d49d47759ae9417328427426cb269 (patch)
treefe23b49073b9b19d84da534b816624f7cc833459 /src/qt/guiutil.h
parent374fd6fc8b4c6539173d5fa0008266aafdb6c668 (diff)
downloadbitcoin-bd315eb5e27d49d47759ae9417328427426cb269.tar.xz
qt: Get rid of cursor in out-of-focus labels
This change is a temporary fix of QTBUG-59514.
Diffstat (limited to 'src/qt/guiutil.h')
-rw-r--r--src/qt/guiutil.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 8741d90102..2bd94b5eb3 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -162,6 +162,21 @@ namespace GUIUtil
};
/**
+ * Qt event filter that intercepts QEvent::FocusOut events for QLabel objects, and
+ * resets their `textInteractionFlags' property to get rid of the visible cursor.
+ *
+ * This is a temporary fix of QTBUG-59514.
+ */
+ class LabelOutOfFocusEventFilter : public QObject
+ {
+ Q_OBJECT
+
+ public:
+ explicit LabelOutOfFocusEventFilter(QObject* parent);
+ bool eventFilter(QObject* watched, QEvent* event) override;
+ };
+
+ /**
* Makes a QTableView last column feel as if it was being resized from its left border.
* Also makes sure the column widths are never larger than the table's viewport.
* In Qt, all columns are resizable from the right, but it's not intuitive resizing the last column from the right.