Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-19940

MouseArea clicked signal fired on doubleClick

    XMLWordPrintable

Details

    Description

      Hi,

      Since MouseArea sends clicked and doubleClicked signals when a user double taps, our team uses a 350 ms timer to distinguish between the two. On a click, our application starts the timer, if the timer fires it's a tap. If two clicks occurs before the timer fires, then gets a doubleClicked signal, which will be treated as doubleTap.

      Our team observed that in some cases, on device, though they do a double tap, they are getting Clicked signal emitted before the timer fires. Further, by installing a event filter on QDeclarativeMouseArea, they observed that the MouseArea itself doesn't get a mouseDoubleClickedEvent in such cases. As a consequence, they end up doing a tap action instead of the intended doubleTap action. Please find a reproducable test application attached with this for your verification. Also please find some debug logs below.

      Debug logs:

      04:42:12.515 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:29 GMT+0530 (UTC) 10 9
      04:42:12.631 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:29 GMT+0530 (UTC) 12 17
      04:42:12.632 [Qt Message] onDoubleClicked hit!
      04:42:13.691 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:30 GMT+0530 (UTC) 13 17
      04:42:13.783 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:30 GMT+0530 (UTC) 17 16
      04:42:13.784 [Qt Message] onDoubleClicked hit!
      04:42:14.787 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:31 GMT+0530 (UTC) 17 17
      04:42:14.788 [Qt Message] onDoubleClicked hit!
      04:42:16.611 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:33 GMT+0530 (UTC) 11 19
      04:42:16.743 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:33 GMT+0530 (UTC) 13 18
      04:42:16.744 [Qt Message] onDoubleClicked hit!
      04:42:17.627 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:34 GMT+0530 (UTC) 17 15
      04:42:17.733 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:34 GMT+0530 (UTC) 13 18
      04:42:17.734 [Qt Message] onDoubleClicked hit!
      04:42:18.582 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:35 GMT+0530 (UTC) 16 17
      04:42:18.695 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:35 GMT+0530 (UTC) 15 18
      04:42:18.696 [Qt Message] onDoubleClicked hit!
      04:42:19.438 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:35 GMT+0530 (UTC) 11 18
      04:42:19.540 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:36 GMT+0530 (UTC) 8 18
      04:42:19.540 [Qt Message] onDoubleClicked hit!
      04:42:20.327 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:36 GMT+0530 (UTC) 13 18
      04:42:20.399 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:36 GMT+0530 (UTC) 11 19
      04:42:20.400 [Qt Message] onDoubleClicked hit!
      04:42:21.139 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:37 GMT+0530 (UTC) 12 19
      04:42:22.158 [Qt Message] onClicked hit!
      04:42:23.463 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:40 GMT+0530 (UTC) 3 20
      04:42:23.562 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:40 GMT+0530 (UTC) 3 19
      04:42:23.563 [Qt Message] onDoubleClicked hit!
      04:42:25.294 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:41 GMT+0530 (UTC) 9 19
      04:42:25.295 [Qt Message] onDoubleClicked hit!
      04:42:30.029 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:46 GMT+0530 (UTC) 11 14
      04:42:31.037 [Qt Message] onClicked hit!
      04:42:32.614 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:49 GMT+0530 (UTC) 13 12
      04:42:33.623 [Qt Message] onClicked hit!
      04:42:35.489 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:52 GMT+0530 (UTC) 7 9
      04:42:35.564 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:52 GMT+0530 (UTC) 11 16
      04:42:35.564 [Qt Message] onDoubleClicked hit!
      04:42:36.492 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:53 GMT+0530 (UTC) 12 12
      04:42:36.579 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:53 GMT+0530 (UTC) 12 14
      04:42:36.580 [Qt Message] onDoubleClicked hit!
      04:42:37.485 [Qt Message] first click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:54 GMT+0530 (UTC) 7 12
      04:42:37.571 [Qt Message] second click time(hh:mm:ss), co-ordinates (x,y): Tue Apr 19 2011 12:29:54 GMT+0530 (UTC) 7 16
      04:42:37.572 [Qt Message] onDoubleClicked hit!

      Thanks & Regards,
      BalaSubrahmanyam Varanasi

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtsymbase Qt Base for Symbian Team
            baluvaranasi BalaSubrahmanyam Varanasi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes