From b43625ccbe4337fc645c09e55d1deb021b9b5b19 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 19 Aug 2009 15:41:33 +1000 Subject: Small doc fixed for mouse handling. --- src/declarative/fx/qfxevents.cpp | 9 ++++++++- src/declarative/fx/qfxmouseregion.cpp | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/declarative/fx/qfxevents.cpp b/src/declarative/fx/qfxevents.cpp index b7b332e..43f0dd7 100644 --- a/src/declarative/fx/qfxevents.cpp +++ b/src/declarative/fx/qfxevents.cpp @@ -143,6 +143,13 @@ Item { */ /*! + \qmlproperty bool MouseEvent::wasHeld + + This property is true if the mouse button has been held pressed longer the + threshold (800ms). +*/ + +/*! \qmlproperty int MouseEvent::buttons This property holds the mouse buttons pressed when the event was generated. @@ -177,7 +184,7 @@ Item { For example, to react to a Shift key + Left mouse button click: \qml MouseRegion { - onClick: { if (mouse.button == Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier) doSomething(); } + onClicked: { if (mouse.button == Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier) doSomething(); } } \endqml */ diff --git a/src/declarative/fx/qfxmouseregion.cpp b/src/declarative/fx/qfxmouseregion.cpp index 1da3c69..88a5c36 100644 --- a/src/declarative/fx/qfxmouseregion.cpp +++ b/src/declarative/fx/qfxmouseregion.cpp @@ -189,9 +189,9 @@ void QFxDrag::setYmax(qreal m) position and which button was pressed. The \e accepted property of the MouseEvent parameter determines whether this MouseRegion - will handle the press \b {and all future mouse events until release}. The default is to accept + will handle the press and all future mouse events until release. The default is to accept the event and not allow other MouseRegions beneath this one to handle the event. If \e accepted - is set to false, \b {no further events will be sent to this MouseRegion} until the button is next + is set to false, no further events will be sent to this MouseRegion until the button is next pressed. */ -- cgit v0.12