[Qt-interest] QStateMachine: Jumping to a specific state

Paul Drummond paul.drummond at iode.co.uk
Fri Apr 9 11:50:46 CEST 2010


Let me explain my app a bit more.

I have an app that I want to write in QML but need to use C++ because QML
won't be released in time!  I only mention this because states/transitions
are more prominent in QML and that's the mindset I am in for developing this
app.  I have based the app loosely on the hyperui demo code but it doesn't
use "pages" as such so I've changed it quite a bit.

The app has 3 main "pages" where each page transition is represented by a
state.  Generally the user moves from page1 to page2 to page3 via states and
this works fine.

There is also a button bar at the bottom of the screen that provides a
button short-cut so the user can go back to page1 from any page.  Ideally, I
would like to implement this button to say "setState(page1)" but there is no
api for that as far as I know.

In C++, it feels like I am try to use state machines where I need something
more dynamic but I am coming from QML where states and transitions are the
norm so I thought I might just be missing something?

Paul Drummond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100409/8cd41132/attachment.html 


More information about the Qt-interest-old mailing list