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
- relates to
-
QTBUG-20524 Mask for mousearea
- Closed
-
QTBUG-9008 A Rectangle with radius doesn't clip a child Image in rounded corners
- Closed
-
QTBUG-115179 Clip optimization in QQuickDeliveryAgentPrivate::pointerTargets is too aggressive
- Closed
-
QTBUG-98334 Support rounded corners on QtQuick Image
- Closed