qt_add_statecharts
.scxml ファイルをC++ソースコードに変換します。
このコマンドは Qt 6.1 で導入されました。
このコマンドは、Qt6 パッケージのScxml コンポーネントに定義されています。以下のコマンドでパッケージを読み込みます:
find_package(Qt6 REQUIRED COMPONENTS Scxml)概要
qt_add_statecharts(<TARGET> file1.scxml [file2.scxml ...]
[OPTIONS ...])バージョン指定なしのコマンドが無効になっている場合は、代わりに `qt6_add_statecharts() ` を使用してください。このコマンドと同じ引数セットをサポートしています。
説明
qt_add_statecharts マクロは、CMakeに対し、qscxmlc ツールを呼び出して、指定された.scxml ファイルを読み込み、SCXML で定義されたステートマシンを実装するクラスを含む C++ ソースファイルおよびヘッダーファイルを生成するよう指示します。
詳細な手順、オプション、および例については、『 Qt SCXML コンパイラ(qscxmlc)の使用方法』を参照してください。
© 2026 The Qt Company Ltd. 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.