[Qt-qml] background timers in QML ?
Bo Thorsen
bo at fioniasoftware.dk
Sat Dec 31 09:40:36 CET 2011
Den 30-12-2011 19:44, Sivan Greenberg skrev:
> Hi all,
>
> I am wondering if there's a recommended way to have background
> timersin Qt Quick apps? My primary use case is an app that reminds me
> to do stuff at periodical times, and for that I thought to install a
> timer per each item that need be reminded, but I wanted to try and see
> if there's a better way or a standard way for that?
>
> Also, it would be nice to have just the timer running firing the app
> only when the reminder needs to happen.
>
> Share you experience if you've done this before, and open source code
> to learn from would be greatly appreciated :)
Remember that QML children have access to parent objects. So if you have
a top of the tree, you can place the timer there and access it from all
the other objects by id name. Personally, I really don't like this, but
it's an option for you.
Another would be to do this in C++ and expose the object by name so it's
available to all of them.
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Qt-qml
mailing list