Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. SCXML and javascript and asynchronouse action
Qt 6.11 is out! See what's new in the release blog

SCXML and javascript and asynchronouse action

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 496 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tatraian
    wrote on last edited by
    #1

    Hello,

    I plan to write an application that based on QML/SCXML. My idea was to create the flow in scxml and the events will trigger my UI transitions (and button pressing triggers the scxml). I would like to create a login service (as demonstration).
    So I created a new Item with minimal content (only a ListView and a BusyIndicator). I created the scxml state machine, after I created the gui Item states and I connected the states of Item and StateMachine. The state machine started and could write log (<log> tag). But I faced problem and questions here:

    • how can I call JS functions from scxml script block (I write what I tried to do, but that didn't worked)?
    • how can I post an event to StateMachine from a JS function?
    • can I reach my gui Item's ListView's model, or I can access only the model of the statechart (like is it in sudoku example)?

    I tried to add my JS file to scxml diagram and after I tried to call the JS function, but that failed. (the log action before the script call runs, but log action after JS call doesn't, and JS function console.log also doesn't write anything).

    You can see the example project on: https://bitbucket.org/tatraian/forum_example/src/default

    Thanks:
    Antal Tatrai

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved