Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. AnimatedImage load source from memory?
Forum Updated to NodeBB v4.3 + New Features

AnimatedImage load source from memory?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 270 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tummon
    wrote on last edited by Tummon
    #1

    Hi all,

    Trying to see if there is a way to load .gifs from memory when using AnimatedImage

    It specifically mentions it is not compatible with QQuickImageProvider.

    (I'm also restricted in the fact I cannot use the filesystem/resource system)

    Has anyone any alternatives?
    Would it be possible to override QNetworkAccessManager and do some custom url handling to point to the data in memory?

    Thanks!

    jeremy_kJ 1 Reply Last reply
    0
    • T Tummon

      Hi all,

      Trying to see if there is a way to load .gifs from memory when using AnimatedImage

      It specifically mentions it is not compatible with QQuickImageProvider.

      (I'm also restricted in the fact I cannot use the filesystem/resource system)

      Has anyone any alternatives?
      Would it be possible to override QNetworkAccessManager and do some custom url handling to point to the data in memory?

      Thanks!

      jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      @Tummon said in AnimatedImage load source from memory?:

      (I'm also restricted in the fact I cannot use the filesystem/resource system)

      That's unfortunate, given that qrc is a glorified char array.

      Has anyone any alternatives?
      Would it be possible to override QNetworkAccessManager and do some custom url handling to point to the data in memory?

      This looks like a legitimate option.

      https://codebrowser.dev/qt6/qtdeclarative/src/quick/items/qquickanimatedimage.cpp.html#364

      d->reply = qmlEngine(this)->networkAccessManager()->get(req);
      

      Use QQmlEngine::setNetworkAccessManagerFactory() to install a customized QNetworkAccessManager that will recognize special URLs passed to QNetworkAccessManager::get().

      Asking a question about code? http://eel.is/iso-c++/testcase/

      T 1 Reply Last reply
      1
      • jeremy_kJ jeremy_k

        @Tummon said in AnimatedImage load source from memory?:

        (I'm also restricted in the fact I cannot use the filesystem/resource system)

        That's unfortunate, given that qrc is a glorified char array.

        Has anyone any alternatives?
        Would it be possible to override QNetworkAccessManager and do some custom url handling to point to the data in memory?

        This looks like a legitimate option.

        https://codebrowser.dev/qt6/qtdeclarative/src/quick/items/qquickanimatedimage.cpp.html#364

        d->reply = qmlEngine(this)->networkAccessManager()->get(req);
        

        Use QQmlEngine::setNetworkAccessManagerFactory() to install a customized QNetworkAccessManager that will recognize special URLs passed to QNetworkAccessManager::get().

        T Offline
        T Offline
        Tummon
        wrote on last edited by
        #3

        @jeremy_k don't know how I missed the notification for this, we have some other workaround in place but need to give this a try, thank you!

        1 Reply Last reply
        0
        • T Tummon has marked this topic as solved on

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved