QFinalStateclass provides a final state. 更多 …
4.6 版新增。
最终状态用于传达 (属于)
QStateMachinehas finished its work. When a final top-level state is entered, the state machine’sfinished() 信号被发射。通常,当最终子状态 (子级QState) is entered, the parent state’sfinished() 信号被发射。QFinalStateis part of 状态机框架 .To use a final state, you create a
QFinalStateobject and add a transition to it from another state. Example:QPushButton button; QStateMachine machine; QState *s1 = new QState(); QFinalState *s2 = new QFinalState(); s1->addTransition(&button, SIGNAL(clicked()), s2); machine.addState(s1); machine.addState(s2); QObject::connect(&machine, SIGNAL(finished()), QApplication::instance(), SLOT(quit())); machine.setInitialState(s1); machine.start();另请参阅
finished()
QFinalState
(
[
parent=None
]
)
¶
- param parent
构造新
QFinalState
对象采用给定
parent
状态。