Mark, thanks a lot! I knew there had to be something like this, but I was looking in the wrong corner :)
Now it's working fine. Thanks again! Conny On Fri, 2011-03-18 at 06:45 -0400, Mark Tucker wrote: > The attached property you are after can be accessed withing the delegate > simply as "index". > > see here: > http://doc.qt.nokia.com/4.7-snapshot/qml-listview.html#delegate-prop > > Mark T > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf > Of Cornelius Hald > Sent: 18 March 2011 10:26 > To: [email protected] > Subject: [Qt-qml] Getting the index of a ListView delegate > > Hi, > > on clicking a ListView delegate, I'd like to know the index of that > delegate. ListView.currentIndex does not help because I'm displaying > several items at the same time. Is there something else? I thought there > would be an attached property 'ListView.index' but there isn't. > > I'm trying to link a ListView with a PathView. They are displaying > different aspects of the same model. If the user clicks on an entry in > the ListView, I want the PathView to show the item with the index > selected by the ListView. > > I'd be happy to hear your ideas! > Conny > > > _______________________________________________ > Qt-qml mailing list > [email protected] > http://lists.qt.nokia.com/mailman/listinfo/qt-qml _______________________________________________ Qt-qml mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-qml
