0

I am having a look at QScxml ECMAScript Data Model and as I have never used any scripting functionality of Qt I am a bit lost. I have seen that Qt has different Script engines (QtScript, QJSScript, QQMLEngine) which are all compatible to ECMAScript standard. So I am not really sure on what scripting language they refer too while saying in the documentation of QScxmlEcmaScriptDataModel

The QScxmlEcmaScriptDataModel class is the ECMAScript data model for a Qt SCXML state machine."

Any extra info or pointer would be very helpful.

Stefano
  • 3,981
  • 8
  • 36
  • 66

1 Answers1

0

They are refering to the SCXML Specification - B.2 The ECMAScript Data Model which in itself has nothing to do with either QML nor QtScript.

On a side note the QtScript module is deprecated in Qt 5.5 and has been removed from the pre-built binaries since Qt 5.6.

To make developer life easier, Qt Creator provides an SCXML state machine editor.

SGaist
  • 906
  • 8
  • 33
  • 109
  • Hi thanks for the answer. As far as I understood from ECMAScript wikipedia page there are multiple implementation of ECMASript. and QtScript is one of them... that's why at first I assumed they were using the Qt implementation of ecmascript... but then i also read that Qtscript is deprecated... so I am confused.... – Stefano May 17 '17 at 12:28
  • You might be mixing several concepts here. The data model itself is written in XML. To make your life easier, you also have a state machine editor in Qt Creator. See the link I added to my answer. – SGaist May 17 '17 at 12:47
  • Thanks... I have actually already created and tested a state machine and successfully run it. I am just not too clear on how this data-model works as examples do not go in clear details... – Stefano May 17 '17 at 13:05
  • 1
    You should download the Qt sources. You'll have the complete sources of the examples and be able to take a look at the state-machine scxml files. That should help you have a better understanding of how things are working. – SGaist May 17 '17 at 15:03