View Full Version : Need help for creating a KDE widget

5th February 2014, 11:58
Hi everyone,

I'm a newbie at using qt, qml, and kde issues. I'm trying to create a plasmoid using qml, and adding it to my desktop using "add widgets" button.
I followed the tutorial at the link : http://techbase.kde.org/Development/Tutorials/Plasma/QML/GettingStarted and applied the sample I've found there (a very short sample indeed consisting of "hello world" :) )
Although I did all the things mentioned there, I only could run the plasma from the terminal (with the command plasmoidviewer) with reaching an invisible path in my computer under root, but this is not what I need. It should have looked like an ordinary widget. I need an icon, a shortcut, I mean something more real for standard users :)
I'm using Kubuntu and qtcreator for your information. I believe I missed something in evolution, please tell me what it is.

Any help would be appreciated.

5th February 2014, 14:00
Plasma Widget/Applets do not look like application widgets if that is what you mean by "ordinary widget", because they are using QtQuick1 and that does not support styling like Qt Widgets.

That will become possible with next generation Plasma due to usage of QtQuick2 which has styled controls (QtQuick.Controls).

It is theoretically possible to embed QtWidget widgets into a Plasma component, since QtQuick1 is based on QGraphicsView and there is a proxy item that can embed widgets.
Will involve some C++ coding though.

What kind of interface do you want to achieve?


19th September 2015, 10:14
To use standard plasma widgets (e.g. Plasma::LineEdit, etc.), you simply add an import line for them. All properties, signals and slots from ordinary Plasma widgets are available there. These widgets are provided as a transition tool, intended to be replaced by the Plasma version of QtComponents, which is currently in development by a gsoc. (note that the Plasma QtComponents have nothing to do with the QtExtraComponents module described above)