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

Invalid event clipping

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.10.0
    • None

    Description

      In several QQuickWindow:deliverXYZEvent() methods events have to be blocked, when being outside of the clipped region . The corresponding code looks like this:

      if (itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape) {
           QPointF p = item->mapFromScene(scenePos);
           if (!item->contains(p)) return false;
      }

      While in the QML use case the clip rectangle is usually the bounding rectangle this is not the case for all items and is also not covered by the API of QQuickItem, that explicitly offers a virtual method QQuickItem::clipRect()

      F.e QQuickText uses this API.

      S the correct code should be:

          if ( !item->clipRect().contains(p) ) return false;

      On a more general note: our application is implemented to 100% in C++ using custom items from the QSkinny framework ( https://github.com/uwerat/qskinny ).  The way how clipping is designed in QQuickItem/QQuickWindow is one of the most limiting issues and it would be nice to see something new with Qt 6.

      If you are more interested in where the design hurts, see: https://github.com/uwerat/qskinny/blob/master/src/controls/QskScrollArea.cpp

       

       

       

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              uwe Uwe Rathmann
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change