diff options
Diffstat (limited to 'doc/src/declarative/qmlintro.qdoc')
-rw-r--r-- | doc/src/declarative/qmlintro.qdoc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/declarative/qmlintro.qdoc b/doc/src/declarative/qmlintro.qdoc index 0a503d7..6cb691a 100644 --- a/doc/src/declarative/qmlintro.qdoc +++ b/doc/src/declarative/qmlintro.qdoc @@ -326,11 +326,11 @@ Item { \section2 Signal Handlers Signal handlers allow actions to be taken in reponse to an event. For instance, -the \l MouseRegion element has signal handlers to handle mouse press, release +the \l MouseArea element has signal handlers to handle mouse press, release and click: \code -MouseRegion { +MouseArea { onPressed: console.log("mouse button pressed") } \endcode @@ -338,10 +338,10 @@ MouseRegion { All signal handlers begin with \e "on". Some signal handlers include an optional parameter, for example -the MouseRegion onPressed signal handler has a \e mouse parameter: +the MouseArea onPressed signal handler has a \e mouse parameter: \code -MouseRegion { +MouseArea { acceptedButtons: Qt.LeftButton | Qt.RightButton onPressed: if (mouse.button == Qt.RightButton) console.log("Right mouse button pressed") } |