Python and QML

Marco Martin notmart at gmail.com
Wed May 9 14:44:12 UTC 2012


On Wed, May 9, 2012 at 4:29 PM, Eric Mesa <ericsbinaryworld at gmail.com> wrote:
> Hey All,
>
> I had an email a few months ago where I was trying to change the color of
> some button in my QML plasmoid based on the output of what happened in a
> python script.  While researching the idea today, I found the following
> resources:
>
> http://qt-project.org/wiki/Connecting_QML_Signals_in_PySide
> http://www.developer.nokia.com/Community/Wiki/Python_Harness_for_QML
> http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qml.html
>
> So....based on those - three questions:
> 1) Which is better PySide or PyQT4?  Based on the PySide website - it looks
> like PySide...but they are obviously biased...hehe

afaik only pyqt has complete bindings for kdelibs for now

> 2) If I go this route, then I'm now launching my program from python instead
> of from plasmoidviewer, right?
> 3) Would my resulting code still be able to be a plasmoid? Or would it just
> have to be a regular program?

i think is in theory possible to make plasmoids that use both python
and qml with the python and qml parts talking each other.

what would be needed i think is to create a python plasmoid, with a
declarativewidget of which its declarative engine should be accessed
by python, then objects created in python registered in the qml
context.

I am no aware about the status of bindings on those parts, that's more
a question for bindings people

Cheers,
Marco Martin


More information about the Plasma-devel mailing list