Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] QML Image not loading over http
QtWS25 Last Chance

[Solved] QML Image not loading over http

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 1.4k Views
  • 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.
  • K Offline
    K Offline
    kayleg
    wrote on last edited by
    #1

    My app running on iOS was working perfectly than all of a sudden the images being loaded from an Akamai CDN stopped loading. The strange part is - it is not all of them. Some do load after the app is restarted. The images that do load in the list view do not show in the detail view, even though the url is the exact same.

    I set up a network disk cache and provided that to the QML engine; with it on or off the same problem still persists.

    I'm not sure if this is due to upgrading from 5.2 to 5.3.1 ( I believe it was working with 5.3.1 for a while)

    QML doesn't print any errors and adding an onStatusChanged handler only logs Loading status, it never gets to another status. The few images that do load do set the status to Ready.

    I know that the images exists and the browser loads them in under 0.5 seconds.

    Loading the images in C++ works fine, all the requests complete with no errors.

    QML code is just a list view with a row that contains an image and the model comes from c++ providing the url to load

    Any help will be greatly appreciated.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Can you provide a minimal sample code that reproduce the problematic behavior ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kayleg
        wrote on last edited by
        #3

        I couldn't reproduce it in a simple example, so I determined it must be something related to the application.

        I changed the root of the application to a StackView instead of just hiding the non visible screens and that reduced the memory footprint considerably and the images started working again.

        I am not sure if it was a memory issue as the app only used 150mb and didn't report out of memory or if there was a simultaneous action that was causing the images not to load.

        It is fixed and probably structured better now.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Nice you found out and improved your code !

          Happy coding !

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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