diff options
author | Paul Wicking <paul.wicking@qt.io> | 2018-09-07 13:48:44 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2018-09-10 10:04:08 +0000 |
commit | b13e3b0eb69a86558a62f2544a271434818c012d (patch) | |
tree | 088926ca4afa6e4f5d53bdc2823d90ddd34f7148 /examples | |
parent | 1398f4f828d70971964bf016d8b642d84af1a8e1 (diff) |
Example: Close popup on mouse click without assigning new lens position
Clicking in the main renderer window passes a new position to the lens,
disregarding the "What's This" (documentation) overlay window.
This change checks if the documentation window is open on click, and if
it is, closes the documentation window and returns without further
handling of the mouse event.
Fixes: QTBUG-7205
Change-Id: I821245ec6c78be00d80af461baf8e4d59e0f351f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/widgets/painting/deform/pathdeform.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/widgets/painting/deform/pathdeform.cpp b/examples/widgets/painting/deform/pathdeform.cpp index cfbbdb7e8e..805804716f 100644 --- a/examples/widgets/painting/deform/pathdeform.cpp +++ b/examples/widgets/painting/deform/pathdeform.cpp @@ -483,6 +483,10 @@ void PathDeformRenderer::timerEvent(QTimerEvent *e) void PathDeformRenderer::mousePressEvent(QMouseEvent *e) { + if (m_show_doc) { + setDescriptionEnabled(false); + return; + } setDescriptionEnabled(false); m_repaintTimer.stop(); |