Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Accessing Repeater model in delegate

$
0
0
Is there a way to access a Repeater’s model in a delegate as you can with ListViews? For example: Repeater {     model: cppModel     delegate: MyComponent {} }   // in MyComponent.qml Rectangle {    id: wrapper ...    Button {         onClicked: // want to directly access the C++ model here rather than have to send a signal to parent component    } ... } I’ve tried what has worked for ListViews…namely: wrapper.Repeater.view.model.someSlot()

Viewing all articles
Browse latest Browse all 4972

Trending Articles