Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 239
Registered: ‎07-26-2010
My Device: Z10
My Carrier: Telkomsel

Re: How to display a picture after chosen via FilePicker?

I figured it out. Small typos here and there (e.g navigation.push(), navitationPane.pushPage(), etc etc).

Current QML editor is not smart enough to alert users about this kind of error.


FilePicker {
                id: picker

                property string selectedFile
                property Page secondPage
                function getSecondPage(){
                    if (!secondPage){
                        secondPage = secondPageDefinition.createObject()   
                    return secondPage
                title: qsTr ("Browse for file")
                mode: FilePicker.Picker
                type: FilePicker.Picture
                viewMode: pickerViewMode.selectedValue
                sortBy: pickerSortBy.selectedValue
                sortOrder: pickerSortOrder.selectedValue
                onFileSelected: {
                    selectedFile = selectedFiles[0]
                    var ppp = getSecondPage()
                   // secondPage.imagePath = selectedFile