[Qt-interest] QStatemachine: Enter state and assignProperty() issue
Samuel Gaist
samuel.gaist at edeltech.ch
Fri Mar 18 15:54:49 CET 2011
On 18 mars 2011, at 15:08, Mandeep Sandhu wrote:
> 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
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
Hello,
You might have some success using:
http://doc.qt.nokia.com/4.7/qstate.html#propertiesAssigned
Hope this helps
Samuel
More information about the Qt-interest-old
mailing list