Qt Quick StateMachine Asserts when using MouseArea::pressed signal



  • Hi,

    Why am I getting ASSERT: "qobjectSignal" in file signaltransition.cpp, line 95 in the following example?

    import QtQuick 2.4
    import QtQuick.Controls 1.3
    import QtQml.StateMachine 1.0 as FSM
    
    ApplicationWindow
    {
      title: qsTr("Test FSM")
      width: 640
      height: 480
      visible: true
    
      MouseArea
      {
        id: userInputMouseArea
        anchors.fill: parent
    
        onPressAndHold: console.log("MouseArea triggered PressedAndHold")
        onPressed: console.log("MouseArea triggered Pressed")
    
        FSM.StateMachine
        {
          id : userInputFSM
          initialState: idle
          running: true
          FSM.State
          {
            id: idle
            FSM.SignalTransition
            {
              // OK
              signal: userInputMouseArea.pressAndHold
              onTriggered: console.log("FSM triggered PressAndHold")
            }
            FSM.SignalTransition
            {
              //// ASSERT: "qobjectSignal" in file signaltransition.cpp, line 95
              signal: userInputMouseArea.pressed // <<========
              onTriggered: console.log("FSM triggered Pressed")
            }
          }
        }
      }
    }
    

    Thanks for any.
    Best regards.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.