[Development] MouseArea::onWheel event documented but not working (Qt5)

Luís Gabriel Lima luis.gabriel at openbossa.org
Sat Jun 2 18:15:38 CEST 2012


Hi Tomasz,

The correct event variable name is "wheel*" *and not "mouse*"*. I'll fix
the docs.
You can see an example in *
examples/quick/mousearea/mousearea-wheel-example.qml*.


Cheers,
-- 
Luís Gabriel
OpenBossa - INdT


On Sat, Jun 2, 2012 at 7:43 AM, Tomasz Siekierda <sierdzio at gmail.com> wrote:

> Hi,
>
> sorry for double posting but this is relevant for both Qt5 ML (as part of
> testing) and Qt-qml (since that is where the issue lies). I am trying to
> use the wheel event available in QtQuick 2.0 & Qt5 in QML. Here is a code
> snippet:
>
> MouseArea {
>     id: whatever
>
>     onWheel: {
>         ScenarioLogic.aMethod(mouse); // both "mouse" and "event" do not
> work
>     }
> }
>
> The event variable (according to docs, it should be named "mouse", but I
> have also tried "event" - to no avail) does not seem to be declared. Error
> message: "ReferenceError: mouse is not defined". I am using Qt5 build from
> git, commit I7a10dca9ee8bc2158e9d211feb4005a29fb7b419 from 16 May 2012.
> Platform is Kubuntu 12.04 x64 with standard xcb backend. The mouse area is
> inside a Flickable, if that changes anything. Other mouse events work
> without problems.
>
> A quick search did not reveal any existing bugs for that. Is this bug
> known? If not, I will create a bug report right away.
>
> Cheers, have a good weekend guys,
> sierdzio
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120602/e1c01947/attachment.html>


More information about the Development mailing list