Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › nativeUtlis.displayImagePicker is not working

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18052

    Niyazi

    Hi,

    I follow the showcase examples and I use UserImage part in my app.

    UserImage and the nativeUtlis.displayCameraPicker perfectly works but the nativeUtlis.displayImagePicker is not working?

    What should I do?

     

    #18055

    Günther
    Felgo Team

    Hi,

    on which device and OS version do you experience the image picker issue?

    Are you able to identify any warning/error in the Application Output when using displayImagePicker?

    Best,
    Günther

    #18057

    Niyazi

    Hi Günther,

    I created new empty app. (And still the orientation: portrait is not working). And the my app I use the UserImage that found it the Felgo Showcase app.

    The Application Output shows some qml/VPlay/gamenetwork folder location which is not included my app. But I am guessing this is some kine Felgo internal things.

    Here is the Application Output (on Samsung Galaxy S7 Edge)

     

    qrc:///qml/VPlay/gamenetwork/gnView/UserImage.qml:117: QML Image: Error decoding: qrc:///qml/VPlay/gamenetwork/gnView/: Unsupported image format 
    /data/user/0/net.vplay.apps.QMLLive/files/qml/MainTemplates.qml:101: TypeError: Property 'dispalyImagePicker' of object NativeUtils(0xe11283c8) is not a function

     

     

    And this the Code part:
    <div></div>
    <div>Connections {
    target: nativeUtils
    onAlertSheetFinished: {
    if (userImage.shownEditPhotoDialog) {
    if (index == 0)
    nativeUtils.dispalyImagePicker()
    else if (index == 1)
    nativeUtils.displayCameraPicker()
    else if (index == 2)
    UserImage.source = “”</div>
    <div>                    userImage.shownEditPhotoDialog = false
    }
    }</div>
    <div>            // Resim Seç
    onImagePickerFinished: {
    //console.debug(“Resim Seç dosya yolu:”, path)
    if(accepted)
    userImage.source = Qt.resolvedUrl(path)</div>
    <div>                userImage.editBackgroundColor = “#000000”
    userImage.placeholderImage = “”
    userImage.editable = false
    }</div>
    <div>            // Resim Çek
    onCameraPickerFinished: {
    //console.debug(“Resim Seç dosya yolu:”, path)
    if(accepted)
    userImage.source = Qt.resolvedUrl(path)</div>
    <div>                userImage.editBackgroundColor = “#000000”
    userImage.placeholderImage = “”
    userImage.editable = false
    }</div>
    <div>        } // Connections</div>
     
    <div></div>
    <div></div>
     

     

    #18064

    Günther
    Felgo Team

    Hi Niyazi,

    The error message

    /data/user/0/net.vplay.apps.QMLLive/files/qml/MainTemplates.qml:101: TypeError: Property 'dispalyImagePicker' of object NativeUtils(0xe11283c8) is not a function

    suggests that the function you stated does not exist within the NativeUtils component.

    If you read the warning carefully, you can quickly see that there’s a typo in your usage of the function:

    • The function is called displayImagePicker, not dispalyImagePicker

    Please read your project errors/warnings carefully before posting an issue for it 😉

    Best,
    Günther

    #18065

    Niyazi

    🙂 Thanks Günther. Sorry for typo mistake.

    After I corrected the <u>dispaly</u> to <u>display,</u> I realize that Felgo Showcase had a string argument on nativeUtils.displayImagePicker(“Choose Photo“).

    My code was as nativeUtils.displayImagePicker(). Adding the “Choose Photo” arguments makes my day. Now is working.

     

    But still I have same error on application output.

     

    qrc:///qml/VPlay/gamenetwork/gnView/UserImage.qml:117: QML Image: Error decoding: qrc:///qml/VPlay/gamenetwork/gnView/: Unsupported image format

     

     

     

    Kind Regards

     

     

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded