I need to push a page when the list view button was clicked. I have tried the below coding but it is not working.
ListItemComponent {
type: "imageItem"
Container {
id: publicimageItem
......
......
ImageButton {
defaultImageSource: "asset:///defaultimg.png"
pressedImageSource: "asset:///pressedimg.png"
onClicked: {
var new_page = publicimageItem.ListItem.view.nextpage.createObject();
publicimageItem.ListItem.view.navigationPane.push(new_page);
}
attachedObjects: [
ComponentDefinition {
id: nextpage
source: "NextPage.qml"
}
]
}// ImageButton
}// Container
}// ListView
When i tried in outside of the listview it will goes to nextpage without any problem.