question about QML e-bike example
-
Hi, all and HNY to everyone. Let's hope that 2021 begins better than 2020 ends.
So, I'm trying to learn a little about QML/Qt Quick, and I'm looking at the provided e-bike example. If I'm reading this correctly, the example uses a time line to effect display changes (from speedometer to a map to a usage timeline chart.
My question is, is this the "normal" way of moving from one display to another? I'm not trying to sound all-knowing (by any means), but to me, that seems a little unnatural. Is there a reason for doing it this way, and would this be considered best practices?
Thanks for any clarification...
-
Hi and HNY to you too,
Can you link the relevant code ?
-
-
Not exactly, states are used to move from one screen to another which is not uncommon. If you take the automation world, for exemple a CNC machine, each state of the machine may show a different screen. For exemple, full controls when stopped, current operation when working with a big stop button etc. That can be modeled with a state machine and so each state will show a different screen.
The timeline here is just there to allow you to animate the transition phase between one screen and another. It's a bit like what you can do with a keynote presentation. You can add effects between two slides. Here you control how the transition between two screens will look like. You do not need it to switch between two screens, but you use it so can have something nice and polished to show to your customer.