Hi, On Thu, Mar 17, 2011 at 8:38 PM, Matti Mäki <[email protected]> wrote: > Hi, > > If I set a MouseArea to fill a Row with Repeater-generated content, is > it possible to know which generated item is currently under mouse cursor? > > I'd like to use MouseArea's onPositionChanged-event to do some things > for a Row item when mouse cursor is moving over it. From MouseEvent I > get the cursor xy-coordinates but is there a reasonable way of mapping > them to a Row item? > > e.g. > > Row { > id: row > Repeater { > model: 5 > delegate: Rectangle { width: 50; height: 10 } > } > } > MouseArea { > anchors.fill: row > onPositionChanged: { /* get row item under x,y and do something with > it */ } > } > > Or any other way of implementing similar functionality? >
The easy way is to put the MouseArea inside the Rectangle element on the delegate and do the necessary scaling of the item on enter/leave. Girish _______________________________________________ Qt-qml mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-qml
