Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved QQuickImageProvider update notification

    General and Desktop
    imageprovider notification update
    1
    2
    1232
    Loading More Posts
    • 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.
    • M
      Mark81 last edited by

      I use a QQuickImageProvider to provide images from my C++ class to QML user interfaces.
      It works fine but the QML page request the image only at creation. I update the image in my QQuickImageProvider class and I want to update the QML Image according.

      I set the cached property to false, but it didn't help.

      1 Reply Last reply Reply Quote 0
      • M
        Mark81 last edited by

        The workaround that appends a suffix to the requested image does the trick:

        image.source = "image://images/myImage?id=" + Math.random()
        

        but it's quite dirty. I wonder if there is a more elegant way (i.e. using signals) to keep the image source updated.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post