![]() Registered Member ![]()
|
Hello,people.
I want to to achieve a function,that is when I click the plasmoid, it will run a shell command. I searched from internet, and found someone used plasmoid.runCommand(), but when I used it, the debuglog said:"TypeError: Property 'runCommand' of object AppletInterface(0x2548540) is not a function" How can I do? THX! |
![]() Registered Member ![]()
|
hi,
you can't do this straight out of qtquick/qml ... the runCommand function you were trying was a plugin... it's not part of core distribution. BUT, I think you could just quickly make one for your project. here's one example. http://www.xargs.com/qml/process.html and for creating a plugin in general: http://doc.qt.io/qt-5/qtqml-modules-cppplugins.html .b |
![]() Registered Member ![]()
|
hmm I leave the reply above as it is, because it's not really invalid..
but surprisingly when I was searching for something completely different this morning I found Kargos. in itself the program is great to make little applications... but it's also a good resource for information.. check this out: https://github.com/lipido/kargos/blob/m ... i/main.qml I never knew about the executable dataengine. this is great, if you are developing especially for KDE.. .b |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]