상태 차트 만들기
Qt Creator 을 사용하여 상태 머신을 포함하는 애플리케이션을 만들 수 있습니다. 파일 마법사는 상용구 코드가 포함된 상태 차트 XML(SCXML) 파일을 생성하며, 이 파일은 SCXML 편집기를 사용하여 편집할 수 있습니다. 모듈의 클래스를 사용하여 Qt SCXML 모듈의 클래스를 사용하여 파일에서 생성된 상태 머신을 Qt 애플리케이션에 임베드할 수 있습니다.

상태 차트를 생성하려면:
- File > New File > Files and Classes > Modeling > State Chart > Choose 를 선택하여 빈 상태 차트를 생성하고 SCXML 편집기에서 엽니다.
- 상태를 Common States 보기(1)에서 상태 편집기(2)로 드래그합니다.
- 하위 상태를 초기 상태로 드래그하여 복합 상태를 만들거나 도구 버튼(3)을 사용하여 선택한 상태와 대상 상태 사이의 전환을 만듭니다.
- 편집기 또는 Structure 보기(5)에서 상태를 선택하여 Attributes 보기(6)에서 해당 속성을 편집합니다.
- 전환 선(4)을 선택하여 에지 포인트를 추가합니다.
- 예를 들어 이벤트를 올리거나 보내려면 컨텍스트 메뉴 명령을 사용하여 상태의
<onentry>및<onexit>요소 또는 전환에 실행 가능한 콘텐츠를 추가합니다.
SCXML 편집기도참조하세요 .
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.