From 5125433552eb905fe228febc4961bca404f6bae2 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sun, 8 Apr 2018 15:49:53 +0300 Subject: Hide emoji panel if it's not under the mouse cursor fixes #254 fixes #246 --- include/emoji/PickButton.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/emoji/PickButton.h') diff --git a/include/emoji/PickButton.h b/include/emoji/PickButton.h index 9c30a549..9117e61f 100644 --- a/include/emoji/PickButton.h +++ b/include/emoji/PickButton.h @@ -18,6 +18,7 @@ #pragma once #include +#include #include #include "FlatButton.h" @@ -37,6 +38,7 @@ signals: protected: void enterEvent(QEvent *e) override; + void leaveEvent(QEvent *e) override; private: // Vertical distance from panel's bottom. @@ -46,5 +48,6 @@ private: int horizontal_distance_ = 70; QSharedPointer panel_; + QTimer hideTimer_; }; } // namespace emoji -- cgit 1.5.1