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

Export QMutableEventPoint and supply necessary setters

XMLWordPrintable

      Associated with:
      https://bugreports.qt.io/browse/QTBUG-133925

      That one is mainly about documenting the difference between Qt5 and Qt6. And this report is about proposing a possible workaround. So the context is that users in Qt5 "simulate" touch events by first creating a bunch of QTouchEvent::QTouchPoint instances and then pass them to QTouchEvent. In Qt6, that is no longer possible since the "replacement", i.e. QEventPoint, is mostly read-only. There is no way to set properties and simulate touch points.

      Nevertheless, there is private class QMutableTouchPoint:
      https://github.com/qt/qtbase/blob/dev/src/gui/kernel/qeventpoint_p.h#L87
      It is a friend class of QEventPoint so it can be used to set properties. But currently, 2 problems:
      1. It is not exported.
      2. It is not an equivalent to QTouchEvent::QTouchPoint. There were setters for, e.g. "last/start normalized/scene/screen position", which are all missing from QMutableEventPoint.
      The original reporter is looking for an equivalent replacement for QTouchEvent::QTouchPoint. Hence the feature requests. If QMutableTouchPoint is not the way to go, then we'd better document some porting advice (as what QTBUG-133925 is about).

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

            srutledg Shawn Rutledge
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes