Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Multiple "when"-conditions for a State



  • Hi all.
    Say I have following states:

    @
    State
    {
    name: "red_state"
    when: color === "red"
    },
    State
    {
    name: "blue_state"
    when: color === "blue"
    },
    State
    {
    name: "circle_state"
    when: shape === "circle"
    },
    State
    {
    name: "blue_circle_state"
    when: color === "blue" && shape === "circle"
    }
    @

    The "blue_circle_state" is never triggered, why is this? Is there a better way to have several conditions for a State?


Log in to reply