Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 2 Support (Qt 5) › load from asset dir custom qml object

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19647

    Bas

    hi ,

    i need to load some binary data and decrypt it from a custom qml object.

    in qml i have a function where i pass in the relative url Qt.resolvedUrl(“../assets/1941_1x.gif”)

    but it does not exists when i open it in QFile in the C++ part.

    i am a bit lost here.

    #19649

    Günther
    Felgo Team

    Hi Bas,

    it is possible that Qt.resolvedUrl creates a path which is not compatible with QFile. For example, if the URL includes a file://<your-path> schema, you might need to strip this information from the path and only pass <your-path> to QFile. If you path is a valid absolute path to the file, you should also be able to read it from C++.

    Best,
    Günther

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

RSS feed for this thread

You must be logged in to reply to this topic.