Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QQuickAsyncImageProvider not caching
Forum Updated to NodeBB v4.3 + New Features

QQuickAsyncImageProvider not caching

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 452 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.
  • ocgltdO Offline
    ocgltdO Offline
    ocgltd
    wrote on last edited by ocgltd
    #1

    According to the documentation QQuickAsyncImageProvider caches images (so I don't have to build that), since its ancestor (QQuickImageProvider) does caching.

    I have 2 separate QML files each containing an Image object, both have the identical source value. I have implemented QQuickAsyncImageProvider and notice that the function is being called for EACH image (even after the first retrieved and showed the image). Why?

    I saw a number of posts saying to add "cache: true" to Image, but I can't find any such property in the documentation for Image.

    eyllanescE 1 Reply Last reply
    0
    • ocgltdO ocgltd

      According to the documentation QQuickAsyncImageProvider caches images (so I don't have to build that), since its ancestor (QQuickImageProvider) does caching.

      I have 2 separate QML files each containing an Image object, both have the identical source value. I have implemented QQuickAsyncImageProvider and notice that the function is being called for EACH image (even after the first retrieved and showed the image). Why?

      I saw a number of posts saying to add "cache: true" to Image, but I can't find any such property in the documentation for Image.

      eyllanescE Offline
      eyllanescE Offline
      eyllanesc
      wrote on last edited by
      #2

      @ocgltd https://doc.qt.io/qt-5/qml-qtquick-image.html#cache-prop

      If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

      1 Reply Last reply
      0
      • ocgltdO Offline
        ocgltdO Offline
        ocgltd
        wrote on last edited by
        #3

        Ok so cache is enabled by default. Then any ideas why QML is retrieving the same image multiple times (no other images being loaded)?

        eyllanescE 1 Reply Last reply
        0
        • ocgltdO ocgltd

          Ok so cache is enabled by default. Then any ideas why QML is retrieving the same image multiple times (no other images being loaded)?

          eyllanescE Offline
          eyllanescE Offline
          eyllanesc
          wrote on last edited by eyllanesc
          #4

          @ocgltd My comment was in the sense of your comment: but I can't find any such property in the documentation for Image, do not point out that it is a solution.

          You say: According to the documentation QQuickAsyncImageProvider caches images (so I don't have to build that), since its ancestor (QQuickImageProvider) does caching. Could you point out where it indicates that QQuickAsyncImageProvider has an image cache?

          If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

          ocgltdO 1 Reply Last reply
          0
          • eyllanescE eyllanesc

            @ocgltd My comment was in the sense of your comment: but I can't find any such property in the documentation for Image, do not point out that it is a solution.

            You say: According to the documentation QQuickAsyncImageProvider caches images (so I don't have to build that), since its ancestor (QQuickImageProvider) does caching. Could you point out where it indicates that QQuickAsyncImageProvider has an image cache?

            ocgltdO Offline
            ocgltdO Offline
            ocgltd
            wrote on last edited by
            #5

            @eyllanesc I though a QQuickAsyncImageProvider ancestor includes caching, though I can't find it looking just now. That would be a simple answer if correct.

            eyllanescE 1 Reply Last reply
            0
            • ocgltdO ocgltd

              @eyllanesc I though a QQuickAsyncImageProvider ancestor includes caching, though I can't find it looking just now. That would be a simple answer if correct.

              eyllanescE Offline
              eyllanescE Offline
              eyllanesc
              wrote on last edited by eyllanesc
              #6

              @ocgltd I do not understand you. The cache is just your speculation or you saw it somewhere in the Qt documentation. I ask because in your initial comment you say: According to the documentation QQuickAsyncImageProvider but in your last one it seems the opposite.

              If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

              1 Reply Last reply
              0

              • Login

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