[Interest] Qt QML 5.4 State Machine - external js from 'guard' can't be called directly
petar.koretic at gmail.com
Fri Dec 19 13:45:20 CET 2014
I'm testing new State Machine from Qt 5.4.
I've created smallest possible code to reproduce the problem that I've hit:
properties like 'onTriggered' also works. So in my testing it doesn't work
only in when custom external function is first called from guard.
And if first we call function 'i_work_if_called' and then
Core.core.call_me() then they both get called.
So I'm probably missing something and probably that's not supposed to work
but it makes problem since it works in some casses and not in others.
There probably isn't any reason to execute some external code from guard
section and I guess it should be avoided since it gets called for each
But I wanted to handle few keys triggering same state without writing
'onTriggered' event which is how I have it now but it's a lot more code.
And if I just say 'key == Qt.Key_up || key == Qt.Key_Down' I don't know
how to later know which of the keys sent the signal.
Any information is appreciated and I would really love for some pointers on
how to actually use it properly. Not many examples exist yet (I haven't
seen in the docs how to properly handle keys so I may be way off) and I
guess not that many people use this yet.
Thanks for reading.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest