diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-18 12:31:34 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-18 11:38:50 +0000 |
commit | 4b151f2ca90b0fff8201b7bc3c22cff9340f4e91 (patch) | |
tree | c48360adc9cf85e8c4fa4d71ff5ee9a536ce2d5f | |
parent | 938aa6c7b9a337561b271b8abb9d1874aedba3e4 (diff) |
Doc: Fix example trying to QObject::connect to a state
This doesn't work anymore. You need to use either macro based connect
with SIGNAL(...) or connectToState().
Change-Id: If6a7b5057444ffdc20e3f4b40f0acd3d5d19bda6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
-rw-r--r-- | src/scxml/doc/qtscxml-instantiating-state-machines.qdoc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc b/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc index 7cac3c3..c431653 100644 --- a/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc +++ b/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc @@ -105,9 +105,8 @@ convenient id "red" in the scxml file), you can write: \code - QObject::connect(stateMachine, &TrafficLightStateMachine::redChanged, - [](bool active) { - qDebug() << (active ? "entered" : "exited") << "the red state"; + stateMachine->connectToState("red", [](bool active) { + qDebug() << (active ? "entered" : "exited") << "the red state"; \endcode And in QML: |