qml - How to navigate to another page from listview button click event in bb 10 cascades? -
i need force page when list view button clicked. have tried below coding not working.
class="lang-qml prettyprint-override">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 tried in outside of listview goes nextpage without problem.
another simplest way store object global variable using next code works fine me.
oncreationcompleted: { qt.tabbedpane = tabbedpane; qt.hometab = hometab; }
here stored tabbedpane in global variable qt.tabbedpane on page creation completed.now able access listitemcomponent using qt.tabbedpane.
in case store navigation pane qt.navigationpane=navigationid, seek access listitemcomponent qt.navigationpane.
hope help.
hope helps.
qml blackberry-10 blackberry-cascades
No comments:
Post a Comment