Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How can i force the engine to call QQuickImageResponse::textureFactory.



  • Hello guys, im trying to implement asynchronous image loading for remote images in qml and inorder to prevent unneccessary network requests, i cache the loaded images using QCache. Images downloaded from the network are loaded and displayed successfully but for cached images, they are loaded and sometimes not loaded and yet they are still cached. i found out that QQuickImageResponse::textureFactory is not being called at some point and i don`t know why. As the documentation says, QQuickImageResponse::textureFactory is called when needed, How can i force the engine to call this function because I tried forcing the QQuickImageResponse::errorString function to return an empty string and made sure the job is completed but still no hope.
    Please help me out?
    Here is what i have done