Forums

OverviewFelgo 2 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support