QFinalState Class
QFinalState 클래스는 최종 상태를 제공합니다. 더 보기...
Header: | #include <QFinalState> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS StateMachine) target_link_libraries(mytarget PRIVATE Qt6::StateMachine) |
qmake: | QT += statemachine |
상속합니다: | QAbstractState |
공용 함수
QFinalState(QState *parent = nullptr) | |
virtual | ~QFinalState() |
재구현된 보호 함수
virtual bool | event(QEvent *e) override |
virtual void | onEntry(QEvent *event) override |
virtual void | onExit(QEvent *event) override |
상세 설명
최종 상태는 QStateMachine 의 (일부) 작업이 완료되었음을 알리는 데 사용됩니다. 최종 최상위 상태가 입력되면 상태 머신의 finished() 신호가 방출됩니다. 일반적으로 최종 하위 상태( QState 의 자식)가 입력되면 상위 상태의 finished() 신호가 방출됩니다. QFinalState는 Qt State Machine 프레임워크의 일부입니다.
최종 상태를 사용하려면 QFinalState 객체를 생성하고 다른 상태에서 이 상태로 전환을 추가합니다. 예제:
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();
QState::finished()도 참조하세요 .
멤버 함수 문서
QFinalState::QFinalState(QState *parent = nullptr)
주어진 parent 상태를 가진 새로운 QFinalState 객체를 생성합니다.
[virtual noexcept]
QFinalState::~QFinalState()
이 최종 상태를 파괴합니다.
[override virtual protected]
bool QFinalState::event(QEvent *e)
다시 구현합니다: QAbstractState::event(QEvent *e).
[override virtual protected]
void QFinalState::onEntry(QEvent *event)
다시 구현합니다: QAbstractState::onEntry(QEvent * 이벤트).
[override virtual protected]
void QFinalState::onExit(QEvent *event)
다시 구현합니다: QAbstractState::onExit(QEvent * 이벤트).
© 2025 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.