Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42060

ImageParticle cannot load a network image resource

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.3.2
    • Fix Version/s: None
    • Component/s: Quick: Particles
    • Labels:
      None
    • Environment:
      Qt 5.3.2 Windows 7 + Qt Creator 3.2.1

      Description

      In project example "Examples\Qt-5.3\quick\controls\gallery\gallery.pro", open "content\Styles.qml", in "fireball" element, replace

      source: "../images/bubble.png"
      

      with

      source: "http://qt-project.org/doc/qt-5/images/used-in-examples/gallery/images/bubble.png"
      

      The image seems to be loaded after the construction of the element but is never displayed on screen. The "fireball.status" changes to "0" to "9" then "0" again whereas an image is correctly defined (0 means Image.Null, ie no image is defined).

      A workaround is to not define the "source" proprety of "fireball" and to add another image element:

      Image {
          //loader for ImageParticle because of bug
          source: "http://qt-project.org/doc/qt-5/images/used-in-examples/gallery/images/bubble.png"
          onStatusChanged: {
              if (status === Image.Ready)
                  fireball.source = "http://qt-project.org/doc/qt-5/images/used-in-examples/gallery/images/bubble.png"
          }
      }
      

      Since the image is put into a cache, the fireball element will be loaded immediately.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            aalpert Alan Alpert
            Reporter:
            agroyer Anthony Groyer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes