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. QQuickImageProvider update notification

QQuickImageProvider update notification

Scheduled Pinned Locked Moved Unsolved General and Desktop
imageprovidernotificationupdate
2 Posts 1 Posters 1.6k 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.
  • M Offline
    M Offline
    Mark81
    wrote on last edited by
    #1

    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
    0
    • M Offline
      M Offline
      Mark81
      wrote on last edited by
      #2

      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
      0

      • Login

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