Problem about QHistoryState
-
@ QHistoryState *s1h = new QHistoryState(s1);
QState *s3 = new QState(); s3->assignProperty(label, "text", "In s3"); QMessageBox *mbox = new QMessageBox(mainWindow); mbox->addButton(QMessageBox::Ok); mbox->setText("Interrupted!"); mbox->setIcon(QMessageBox::Information); QObject::connect(s3, SIGNAL(entered()), mbox, SLOT(exec())); s3->addTransition(s1h); machine.addState(s3); s1->addTransition(interruptButton, SIGNAL(clicked()), s3);@
//------------
this snippet from Qt document about QHistoryState
i wonder to know one of statements : s3->addTransition(s1h);
how the s3 state transition to s1h (QHistoryState) without signal or event,
it should be some thing like that: s3->addTransition( button, SIGNAL(clicked(), s1h) );