Registered Member
|
Currently it has only QML API as techbase writes, should we wait for KDE5 where PyQt5 may be re-supported?
|
Administrator
|
Short answer: never.
Long answer: All the extra language support has been ripped out, by design, as the only supported way to build Plasma applets will be through QtQuick (not easily supportable on dynamic languages - PyQt5 itself does some hacks just to allow that). Also, many implementations had longstanding bugs (I know, because I looked at the code and fixed some of them) and uncaught exceptions in Python code (programmer mistake) would cause the underlying bound C++ object (from Plasma) to get deleted, causing hard to debug crashes.
"Violence is the last refuge of the incompetent."
Plasma FAQ maintainer - Plasma programming with Python |
KDE Developer
|
I would not be as categoric as Einar, but the essence of his answer is correct.
There has been some experimental work to bring other languages in QML, like CoffeeScript. I'm not sure whether it will ever get merged into Qt master, even if it gets finished. If not, It can be done through a simple preprocessor. Until either Plasma starts supporting something else, or Qt does, you'll be forced to use JS inside QML. For other parts, you can use anything that compiles to javascript (and C++ for the underlying things). For a list of languages that can compile to JS, you can refer to (contains a couple of Python or Python-like languages, no idea how mature the projects are): https://github.com/jashkenas/coffeescri ... pile-to-js |
Registered Member
|
So C++ is the only way to extend QML in plasmoid/plasma-widget there?
|
KDE Developer
|
We still have dataengines/servicejobs like in Plasma 4 which can be in Python and then exposed to QML.
For anything more advanced, C++. |
Administrator
|
Note that this implies the existence of Python bindings for plasma-framework, and these at the moment don't exist.
"Violence is the last refuge of the incompetent."
Plasma FAQ maintainer - Plasma programming with Python |
KDE Developer
|
plasma-framework/src/scriptengines/python ?
I've not tested them, but they do exist. |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell