Skip to content
  • 0 Votes
    2 Posts
    213 Views
    B

    @ian28 the way you are doing it is how one would implement a new QML component in C++ that would tend to be purely used in QML - i.e. you wouldn't normally interact with it from the C++ side once it is created.

    If you wanted to continue with that sort of approach, it might be better to create the timer in QML and have that update the path of your Image.

    However a better fit might be to expose your "model" via a "singleton instance" (see qmlRegisterSingletonInstance). This is the more modern approach that is advised rather than using the older setContextProperty, but you will probably find more information out there about using setContextProperty. It's not massively different in principle and it might be easier for you to use the older approach in order to get started.

  • 0 Votes
    4 Posts
    1k Views
    M

    Ok thx guys, that was what I was worried about. I think I'll have to redo the design with a QML component though.

  • 0 Votes
    2 Posts
    1k Views
    sierdzioS

    It's already integrated. No need to do anything special. See this and this.