Hello everyone,
This is my first post, so feel free to remark any mistake I could have.
I’m seeking for tutorials, documentation or help to create a basic application using KDE Frameworks.
My first thought was to search “KDE Frameworks Examples”, which led me to this frameworks page: KDE Frameworks | Developer .
This page has a button with the text “Developer Documentation - Code an application in C++ with Qt and QML.”, and that led me to a list of the different modules in KDE Frameworks, but with no examples. I also searched in this forum “Examples” but with no luck.
I want to learn the basics of KDE Frameworks to start programming with it, but can’t find any example to begin with. I know I can search big applications and dig into the code of them, but maybe I’m just missing something very simple.
As a comment, my objective is to develop a wallpaper plugin for Plasma, but I wanted to start with more simple things before dealing with it, so any info regarding this will also be appreciated.
As a side question: Developing using KDE Frameworks can be done entirely using Kate or Kdevelop only? Not sure where I heard this, but as my understanding, those two applications can be used to compile Qt applications.
Unfortunately, most Frameworks lack introduction to their API.
I would argue their API are mostly well thought-out and documented though but that’s not good for newcomers.
The best simple examples you can find are those frameworks unit-tests (if they exist) and then KDE apps that leverage them.
Don’t hesitate to ask questions about specific use-cases.
Also to note most KDE software is built on-top of Qt which does provide tutorials and examples and its code design will be similar to KDE’s, KDE Frameworks completing Qt where Qt does not provide a feature.
For a wallpaper plugin there is no documentation. This isn’t part of KDE Frameworks, but of plasma which does not mean to be reused as much and as such does not provide a lot of documentation.
For a wallpaper plugin, the code is rather simple. It is implemented using Qml, so you’d need to learn about its basics. First Steps with QML | Qt 6.7
As a side question: Developing using KDE Frameworks can be done entirely using Kate or Kdevelop only? Not sure where I heard this, but as my understanding, those two applications can be used to compile Qt applications.
For Qml editing any text-editor is fine but Kate, KDevelop or Qtcreator do have some good support for it with syntax highlighting and linter integrated.
First of all, thank you guys for all the info! I hope this will also help people who want to start doing something with KDE Frameworks.
Unfortunately, most Frameworks lack introduction to their API.
I would argue their API are mostly well thought-out and documented though but that’s not good for newcomers.
Oh, that’s unfortunate. But I’m not sure if that’s totally a problem, maybe not all the frameworks are meant to be used by newcomers. From my research, I found that KXmlGui has a nice introduction not only for the framework itself, but also to start building an application using kdesrc-build, with the building steps and explaining the code of a simple message box program called “Hello World” (Getting started with KXmlGui | Developer) and more examples of various functionalities.
Don’t hesitate to ask questions about specific use-cases.
Sure I’ll do! Thanks.
For a wallpaper plugin there is no documentation. This isn’t part of KDE Frameworks, but of plasma which does not mean to be reused as much and as such does not provide a lot of documentation.
Oh, right. No problem. With the info you gave me, I have more than necessary to start diving on how those plugins works and start doing my own.
For Qml editing any text-editor is fine but Kate, KDevelop or Qtcreator do have some good support for it with syntax highlighting and linter integrated.
Oh, great. I already have Kate and Qt Creator, so that will be the way to go for now.
And one more question (And a bit off-topic), what do you think about using Kate for C++ development? It didn’t recognize the includes automatically, but I’m not sure if it’s just a clangd configuration issue, a problem in my environment or a limitation of Kate itself.
guillaumef,
Thanks for the info! I’ve been checking the app and found it very useful. It even has a generator of wallpaper plugins, exactly what I need to start with. It will help a lot new people like me, it should be more known!