Your first Plasma 6 widget: C++, QML and the Observer pattern

🦎 Hi geekos! On 14 October 1996 a student called Matthias Ettrich announced a “Kool Desktop Environment” for Linux. Thirty years later KDE is still going, so happy 30th birthday, KDE! The community collects the celebrations on the KDE at 30 page. Image credits: KDE logo from the KDE press kit (LGPL). KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. This post is my birthday present: the tutorial I wanted when I tried to write my first Plasma widget and got lost in the docs. We will build a small Plasma 6 widget with a C++ model and a QML view, a button that counts clicks. It is about 100 lines of code, and it builds, installs, runs in your panel and has a unit test. On the way we meet four ideas that Qt and KDE developers use daily: signals, slots, the Observer pattern and MVC. The complete code is on GitHub: ilmanzo/plasma-hello-counter. ...

October 2, 2026 · Andrea Manzini
Buy Me a Coffee at ko-fi.com Buy Me A Coffee

This site does not use cookies or collect any personal data. © 2026 Andrea Manzini.