[Qt-interest] QStatemachine: Enter state and assignProperty() issue
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Fri Mar 18 15:08:20 CET 2011
Hi All,
I'm using QSM to control some GUI widgets in an application. I use the
property assignment feature of QSM to make a widget "visible" (using
QWidgets visible property), when its in the state that the widget
represents and, "invisible" when its not.
I also use the QState::onEnty()/onExit() callbacks to do some actions
specific to a state.
The widgets attached to a state expect to be visible when the SM
enters the state. But I found that the property assignment happens
once I return from the onEntry() callback. So any widget that expects
itself to be visible, will not be when we enter the state.
How should such a situation be handled? Should I call the widgets
enter/exit state callbacks using a Timer and not directly from
QState::onEntry()/onExit() functions? Whats a reliable place to assume
that all property assignments have taken place?
Thanks,
-mandeep
More information about the Qt-interest-old
mailing list