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

Add support in QML State for running a StateChangeScript when exiting a State

    XMLWordPrintable

Details

    Description

      It is now possible to define a StateChangeScript that is run when a state is entered. But it is not possible to run a script when leaving a State.

      A State could have properties "onEntry:" and "onExit:" that would contain the name of the script to run upon entry and exit.

      I can work around this by adding script actions to Transitions, but then I possibly need to add the action to several transitions (if a state has more than one possible next states). And a transition is not the right place to do state related clean up/housekeeping actions, anyway.

      As an example, UML state machines support entry and exit actions: http://en.wikipedia.org/wiki/UML_state_machine#Entry_and_exit_actions

      Attachments

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

        Activity

          People

            mbrasser Michael Brasser
            ap_tuovinen Antti-Pekka Tuovinen (closed Nokia identity) (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes