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

AA_SynthesizeTouchForUnhandledMouseEvents doesn't work on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 5.10.0
    • QPA
    • None
    • macOS 10.13.2, Qt Creator 4.5, Qt 5.10.0
    • macOS

    Description

      This is a new issue with Qt 5.10.0, Touch events (in addition to Mouse events) correctly appeared with Qt 5.9.2.

      To reproduce, in main.cpp, set

      QCoreApplication::setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents);
      

      Create a TouchTest.cpp file with a class TouchTest that is derived from QQuickItem:

      class TouchTest : public QQuickItem
      {
          Q_OBJECT
      protected:
          virtual bool childMouseEventFilter(QQuickItem* item, QEvent* event);
      }
      

      In the overridden function, log the event type:

      bool TouchTest::childMouseEventFilter(QQuickItem*, QEvent* event)
      {
          qDebug() << "Touch event type =" << event->type();
      }
      

      Create a test.qml file with a TouchTest component.

      Build the application with Qt 5.10.0 (Qt Creator 4.5) on macOS 10.13.2, run it and make a swipe gesture with the mouse (click, move, release).

      Result: One MouseButtonPress, several MouseMove and one MouseButtonRelease.

      Expected: In addition to the mouse events, I would expect TouchBegin, TouchUpdate and TouchEnd events.

      Note: Works fine when built with Qt 5.9.2 on macOS. Works fine when built with Qt 5.10.0 for iOS or Android.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            xewton Alexander Gross
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes