Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

How to pass parameters between states of a QStateMachine

$
0
0
Hello, I was wondering, what is the proper way of passing parameters between states in a QStateMachine. The transitions between states are triggered by signals, but the signal parameters are not passed to the other QState – only entered() is emitted without options to specify some input data. One way I can think to solve the problem is to make QSignalTransition subclass, take the signal parameters in onTransition(QEvent* event) and set them to the targetState() using assignProperty() or some custom method of QState descendant. Is there some default solution from QStateMachine framework which I am missing?

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>