summaryrefslogtreecommitdiff
path: root/vcl/inc/qt5
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-04-19 16:03:56 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2022-04-20 19:37:41 +0200
commitdc886bc6de2c0061a840bea2426663c3be2ecd26 (patch)
tree7ca849b5a24c3e62f2968f0efed5c499a2777231 /vcl/inc/qt5
parente44f71dd3439cd1c473b2e32516e33986de042f3 (diff)
tdf#140463 Qt handle mouse enter+leave events
Currently just implemented for the QtWidget, but still as a static function, so it may be used for QtObject at some point too. But there is no (mouse) enter or leave event function in QWindow, so no way to handle these there. And since we can't modify the returned QWidget from QWidget::createWindowContainer, the only way would be to expand the static QtWidget::handleEvent used by QtObjectWindow::event ... if it's actually needed at some point. Change-Id: If9009e5dfca508acd1e702df1a17eb8ad7c29690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133190 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/qt5')
-rw-r--r--vcl/inc/qt5/QtWidget.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/inc/qt5/QtWidget.hxx b/vcl/inc/qt5/QtWidget.hxx
index 878c8b1229ce..2ebe83fcbae1 100644
--- a/vcl/inc/qt5/QtWidget.hxx
+++ b/vcl/inc/qt5/QtWidget.hxx
@@ -51,6 +51,7 @@ class QtWidget : public QWidget
static void commitText(QtFrame&, const QString& aText);
static bool handleKeyEvent(QtFrame&, const QWidget&, QKeyEvent*, const ButtonKeyState);
static void handleMouseButtonEvent(const QtFrame&, const QMouseEvent*, const ButtonKeyState);
+ static void handleMouseEnterLeaveEvents(const QtFrame&, QEvent*);
static void fillSalAbstractMouseEvent(const QtFrame& rFrame, const QInputEvent* pQEvent,
const QPoint& rPos, Qt::MouseButtons eButtons, int nWidth,
SalAbstractMouseEvent& aSalEvent);
@@ -75,6 +76,8 @@ class QtWidget : public QWidget
virtual void wheelEvent(QWheelEvent*) override;
virtual void closeEvent(QCloseEvent*) override;
virtual void changeEvent(QEvent*) override;
+ virtual void leaveEvent(QEvent*) override;
+ virtual void enterEvent(QEvent*) override;
void inputMethodEvent(QInputMethodEvent*) override;
QVariant inputMethodQuery(Qt::InputMethodQuery) const override;