I'm working on this small KDE plasmoid and I really like the QtQuick/QML, but now I have this requirement. I need to do an action when a window is shown or closed in KDE. KDE API have signals for that: https://techbase.kde.org/Development/Tutorials/KWin/Scripting/API_4.9#Signals_3
windowClosed(KWin::Toplevel *toplevel, KWin::Deleted *deleted) windowShown(KWin::Toplevel *toplevel)
But, I don't know how to connect the KDE signals with my QML plasmoid.
I guess with a little bit of C++ it might be possible. No problem with mixing C++ and QML, this is documented by Qt quite good.
I think what I need is C++ code, which takes the qml as a layout and setup the signal connection.
Is that even possible?