From 4b151f2ca90b0fff8201b7bc3c22cff9340f4e91 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 18 Nov 2016 12:31:34 +0100 Subject: 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 --- src/scxml/doc/qtscxml-instantiating-state-machines.qdoc | 5 ++--- 1 file 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: -- cgit v1.2.3