Hi, I am trying to implement state machines using scxml
-
Hello friends,
I am trying to implement statemachines using scxml.
I have used states and transitions and i am able to acces the states in qml.
Same way i have also created a class and tried to create object of state chart and access it in that class.
I am only able to check the name() of the object.
Can anyone help me how to check the current state of state machine in cpp. -
@RashNav_123
Yes you can access them from C++. Have you read through https://doc.qt.io/qt-5/qtscxml-overview.html, and looked at the various examples from https://doc.qt.io/qt-5/examples-qtscxml.html ?I admit I know nothing about QML. But if you are having trouble exposing/accessing the class(es) from QML I think you should show the skeleton of what you have tried to do so that QML experts can comment.
-
From my experience with state machines in SCXML I don't think it is worth your time an effort. It only works OKAY and is significantly more complicated than just using the standard state machine modules offered by qt. It felt like someone had a good idea to implement this but it was never really polished to the typical standard you expect from most Qt modules.
-
@RashNav_123 said in Hi, I am trying to implement state machines using scxml:
I am only able to check the name() of the object.
Could you show your code? Or at least an snippet of what you've tried so far?