|
|
2011-06-12
, 22:45
|
|
Posts: 724 |
Thanked: 1,255 times |
Joined on Nov 2007
@ Cambridge, UK
|
#2
|
Essentially, as the title states. I wish to access the text data provided by the selected delegate and insert it into a text field. I have searched but am unable to return any results. I'm using an XMLListModel as the model and ListView to display the data.
Any help would be greatly appreciated.
Thanks
| The Following User Says Thank You to tswindell For This Useful Post: | ||
|
|
2011-06-12
, 22:48
|
|
Posts: 650 |
Thanked: 619 times |
Joined on Nov 2009
|
#3
|
// posView is a ListView element posView.model.get(posView.currentIndex).quoteAsk
MouseArea {
id: posMouseArea
anchors.fill: background
onClicked: {
posDelegateItem.ListView.view.currentIndex = index
}
}
| The Following User Says Thank You to sony123 For This Useful Post: | ||
|
|
2011-06-12
, 22:55
|
|
Posts: 1,048 |
Thanked: 979 times |
Joined on Mar 2008
@ SF Bay Area
|
#4
|
Text {
id: outsideText
text: "Default text"
}
ListView {
delegate: Item {
MouseArea {
anchors.fill: parent
onClicked: outsideText.text = text
}
}
|
|
2011-06-12
, 22:59
|
|
Posts: 662 |
Thanked: 653 times |
Joined on Feb 2010
|
#5
|
Any help would be greatly appreciated.
Thanks