title: How to change state on QML
body: <p>I have defined two states in my UI form.
  I want to change the state from my main Class.</p>
  
  <p>UI:</p>
  
  <pre><code>State {
      name: "State1"
      PropertyChanges { target: signal; color: "green"}
      PropertyChanges { target: flag; state: "FLAG_DOWN"}
  
      PropertyChanges {
          target: loginButton
          x: 29
          y: 417
      }
  }
  </code></pre>
  
  <p>Main:</p>
  
  <pre><code>loginButton.onClicked: state.state = "State1"
  </code></pre>
  
  <p>How to change the state from the main? </p>