![]() Registered Member ![]()
|
I'm pretty much a noob at Python, and a total noob at all things related to KDE development. I'm struggling to build a basic plasmoid, due to the little documentation available.
Anyway, my current problem: how do I sent the font and font size for a plasmoid in Python? And a broader question - is there python API documentation available somewhere? One more thing - how do I view the error output in Plasmate? I'm finding that when something doesn't work, I have to install the broken plasmoid, run plasma-desktop from the console, and then add the widget, all just to debug. Quite cumbersome. Thanks! |
![]() Administrator ![]()
|
Hmm... according to the QGraphicsWidget documentation, passing a QFont to the setFont() function should be sufficient, but it isn't listed in the member list of Plasma::Applet, so this might not be possible. It is more than likely a flaw of the documentation however.
You may find the below links helpful. General KDE Documentation (C++) Qt documentation (C++) PyQt4 reference guide PyQt4 class reference
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Thanks for the suggestion, I'll try that.
In response to my last question, launching plasmate from a terminal provides debugging info . . . I can't believe I didn't think of that earlier. |
![]() Administrator ![]()
|
You can also use plasmoidviewer and give it the path of the plasmoid, and it'll be loaded for you in a window. You can also simulate different use cases (desktop, panel) like that.
Regarding the Python API, it should be bundled with kdebindings, but not all distributions ship that. Bear in mind that it's directly translated from the C++ sources, so sometimes it's better to look at the C++ API directly - most of the time (with some exceptions such as KConfigXT) it can be directly translated to Python.
"Violence is the last refuge of the incompetent."
![]() Plasma FAQ maintainer - Plasma programming with Python |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]