diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-09-18 10:56:51 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-10-27 11:06:24 +0000 |
commit | 6115585477bea66d90acbbd8a25b898d121bd50e (patch) | |
tree | e768a73536e7f4219c6e2b2c8eadf88fb931100f /src/quicktemplates2/qquickabstractbutton_p_p.h | |
parent | 960798f9117bc5aa4aa55bf868cbb0286f8e99b6 (diff) |
QQuickAbstractButton: expose the press point
This has been frequently requested to make it possible to position
context menus, for example. The initial press point is used for drag
threshold, so we need to maintain the current press point separately.
[ChangeLog][Controls][AbstractButton] Added pressX and pressY
properties.
Task-number: QTBUG-62811
Change-Id: Ibb7b9d254ccf68876d5a3049881fee29a45530e4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickabstractbutton_p_p.h')
-rw-r--r-- | src/quicktemplates2/qquickabstractbutton_p_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickabstractbutton_p_p.h b/src/quicktemplates2/qquickabstractbutton_p_p.h index 2ff0c48e..765664d9 100644 --- a/src/quicktemplates2/qquickabstractbutton_p_p.h +++ b/src/quicktemplates2/qquickabstractbutton_p_p.h @@ -69,6 +69,9 @@ public: return button->d_func(); } + void setPressPoint(const QPointF &point); + void setMovePoint(const QPointF &point); + void handlePress(const QPointF &point) override; void handleMove(const QPointF &point) override; void handleRelease(const QPointF &point) override; @@ -115,6 +118,7 @@ public: #endif QQuickIcon icon; QPointF pressPoint; + QPointF movePoint; Qt::MouseButtons pressButtons; QQuickItem *indicator; QQuickButtonGroup *group; |