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

Execution of multiple transitions does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.7.0
    • None
    • Mac OS 10.6.4

      Please consider the following example:

      import Qt 4.7
      
      Rectangle {
          width: 640
          height: 480
      
          state: "STATE_1"
          focus: true
      
          Keys.onPressed: {
              console.log("key pressed");
              state= "STATE_2"
      
          }
      
          states: [
              State {
                  name: "STATE_1"
              },
              State {
                  name: "STATE_2"
              }
      
          ]
      
          // only one transition executed
          transitions: [
              Transition {
                  from: "STATE_1"
                  ScriptAction {
                      script: { console.log("leaving STATE_1"); }
                  }
              },
              // This is ignored unless first transition removed
              Transition {
                  to: "STATE_2"
                  ScriptAction {
                      script: { console.log("entering STATE_2"); }
                  }
              }
      
          ]
      
      }
      

      I believe, that it is quite normal to have transitions that are executed when leaving a state and some when entering a state.
      However, right only one of both is possible.

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

            brasser Michael Brasser (closed Nokia identity) (Inactive)
            pixtur Thomas Mann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes