- 
    Bug 
- 
    Resolution: Done
- 
    P1: Critical 
- 
    5.3.2
- 
    None
- 
    Linux
- 
        360fcf3a99d84b038326d05f8ea8718b40bff2c0
Using the basic test below you can see that Item::contains( point ) always returns true:
import QtQuick 2.3 Rectangle { width: 400 height: 400 color: "green" Rectangle { id: block width: 50 height: 50 color: "red" anchors.centerIn: parent } MouseArea { anchors.fill: parent onClicked: { var pnt = mapToItem( block, mouse.x, mouse.y ); console.log( "pnt x:", pnt.x, "y:", pnt.y ); if ( block.contains( pnt ) ) { console.log( "Inside" ); } else { console.log( "Outside" ); } } } }
Inside is always printed regardless of the input coordinate. Adding debug to QQuickItem::contains(const QPointF &point) const reveals that the input arg is being converted to QPointF(0, 0) before it arrives.
| For Gerrit Dashboard: QTBUG-41452 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 109957,3 | Return the correct type from Item::mapToItem/Item::mapFromItem. | 5.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |