[SOLVED] animation when changing qml pages

  • Hello,

    How are you?
    I need help about adding animation when changing qml pages. How can I manage to do that please?.
    thanks in advance.

  • There is no such QML element Page. Are you using components? If you are then animation is handled for you. If you are not then you will have to do a little bit of manual work. Read: http://doc.qt.digia.com/qt/qdeclarativeanimation.html

  • I meant qml files, with a loader actually. Can I have an example ? Or just an insight of how I could manage to do it.

    1. Start without loader
    2. Create two screen sized pages (e.g. rectangles of different colour) side-by-side (one rectangle will naturally be out-of-screen, e.g. by setting property x to width)
    3. Add sliding animation using states and transitions (change rect 1 X from 0 to -width and rect 2 x from width to 0).
    4. Add loader when you will have animation in place.

    Does that help?

  • Oh thank you! That really help indeed.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.