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

[REG] changed sourceSize does not reload QML Image

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P1: Critical P1: Critical
    • None
    • 6.7.2
    • Quick: Other
    • None
    • Linux n97 6.9.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 21 Jun 2024 19:49:19 +0000 x86_64 GNU/Linux
    • Linux/X11

      Take this example:

        background: Image {
            anchors.centerIn: parent
      
            source: "image://svg/:/tiger.svg"
            sourceSize: {
              const wh = Math.min(parent.width, parent.height)
              return Qt.size(wh, wh)
            }
          }
      

      When sourceSize changes I'd expect the Image to reload, but it does not happen. Something is wrong. Tracing into the code shows the image is not being reloaded, a new image is not being requested from the image provider.

      Sample demonstrating the bug (I expect the tiger to resize and indeed this is what used to happen with older versions of Qt):

      https://github.com/user1095108/qtnanosvg

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

            hatemelkharashy Hatem ElKharashy
            janezzabc Janez Žemva
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes