Data Engine/QML/Python Guidance Needed
Eric Mesa
ericsbinaryworld at gmail.com
Mon Aug 15 15:02:16 UTC 2011
On Mon, Aug 15, 2011 at 10:30 AM, Luca Beltrame <einar at heavensinferno.net>wrote:
> In data lunedì 15 agosto 2011 09:37:29, Eric Mesa ha scritto:
>
> > its XML structure, right? So the QML can just treat it as XML later?
> IOW,
> > I don't want to lose the benefit of XML's structured data.
>
> If you turn it into a QVariant, there's an additional PyQt method to turn
> it
> back into a Python object, using the toPyObject() method of the QVariant
> instance.
>
So if I did that, would the process be - turn my tuple into a QVarient, put
it into the data engine, then, in the QML side grab it and turn it back into
a PyObject?
Although maybe that's not necessary. If I have it as a text file with XML
structure, perhaps QML will just read that straight from the data engine?
(Without needing it to be a python object?) I have to review my code and
see if I need the tuple or if I can change my code a bit so it just needs
the XML.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20110815/9f37c788/attachment.html>
More information about the Plasma-devel
mailing list