Storing a list of elements in QML
Daniel Kreuter
d.kreuter at fh-bingen.de
Wed Jul 11 16:56:35 UTC 2012
On Wednesday, July 11, 2012 07:30:50 AM Arthur Taborda wrote:
Hey
I am recently learning (at least trying to) plasmoid development in QML for a
week. To do this I am developing a very simple pomodoro plasmoid, but right
now I'm stuck because I can't find any documentation to make some simple
things.
In my plasmoid I have a list of tasks and I need to store this tasks
somewhere. I don't know how is the proper way to do this, but I'm assuming
it's on the kcfg file. The problem is that I am not sure how to store a list of
elements in kcfg, and how to get back in a ListModel too. I am trying now
using a big string separated by commas, but it doesn't seen the right way, and
it's not working too...
GitHub repo: https://github.com/arthurtaborda/Tomatoid
Please help me :/
--
Arthur Taborda
Hi,
for storing data in qml you can make use of the Model-View Pattern of Qt
(described in detail here: http://doc.qt.nokia.com/4.7-snapshot/model-view-
programming.html).
When the tasks are in the kfcg file, there is a small tutorial here:
http://techbase.kde.org/Development/Tutorials/Using_KConfig_XT
Hope this would help
So long
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120711/493369dc/attachment.html>
More information about the Plasma-devel
mailing list