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

QQuickView::mousePressEvent() not always called on Android (but on desktop)

    XMLWordPrintable

Details

    • Android

    Description

      I've created a sub class of QQuickView that overrides mousePressEvent() like this:

      void CustomViewer::mousePressEvent(QMouseEvent *event)
      {
          qDebug() << "MousePress:" << event;
          QQuickView::mousePressEvent(event);
          emit interaction();
      }
      

      If run on the desktop my custom mousePressEvent() method is called whenever the mouse is pressed by the user. No matter if the user clicks inside a QQuick MouseArea or outside of it.

      But if the code is run on Android, the mousePressEvent() method is only called if the user taps outside a MouseArea. If the user taps inside a MouseArea or a ListView, the method is not called at all.

      Update: I see the same behavior with mouseMoveEvent() and mouseReleaseEvent(). Also touchEvent() is never called, but I think this is intentional.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            conny Cornelius Hald
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes