Uploaded image for project: 'Qt Safe Renderer'
  1. Qt Safe Renderer
  2. QSR-889

Incorrect object id in the changing states example code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • QSR 1.2
    • QSR 1.2
    • Documentation
    • None
    • I27a33ba0340dc553b321f28040797a27db77d4c7

      Please see the following page: 

      https://doc-snapshots.qt.io/qtsaferenderer/qtsr-animations.html

      SafePicture {
          id: engineIcon
          width: 40
          height: 40
          x: 40
          y: 40
          source: "iso_grs_7000_4_2423.dat"
          states: [
              State {
                  name: "warning"
                  PropertyChanges { target: icon; width: 80; height: 80; color: "yellow"}
              },
              State {
                  name: "fault"
                  PropertyChanges { target: icon; width: 80; height: 80; color: "red"}
              }
          ]
      }
      

      Is there a bug in the code? 

      id: engineIcon

      target: icon

      These do not match.

      The following example uses the same object id, although it is ambiguous since there are two lines:

      id: turnleft
      objectName: "turnleft"

      So in the transition, there is a reference to target: turnleft

      I wonder which one it refers to? to the id or to the objectname?

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

            tarjasundqvist Tarja Sundqvist
            assaarel Asmo Saarela (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes