このページでは

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 マクロは、提供された.scxml ファイルを読み込み、SCXML で定義されたステートマシンを実装するクラスを含む C++ ソースファイルとヘッダファイルを生成するqscxmlc ツールを起動するように CMake に指示します。

詳しい説明、オプション、例については 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.