i found qml XmlHttpRequest is fit for my needs, thanks for your reply.

On 2013年7月16日星期二 CST下午8时44分01秒, Sebastian Kügler wrote:
Hi Bruce,

On Tuesday, July 16, 2013 19:51:09 bruce wrote:
i have wrote a little plasma-qml applet.i try to utilize HTTP extension from plasma-javascript to retreive web resources. but plasmoid.getUrl() returned undefined. in plasma-javascript works well.
i have pasted the main.qml code into paste.kde.org, link follows:
http://paste.kde.org/p1f0f7ab5/
the attachment is the whole project zip file.

i have add line X-Plasma-RequiredExtensions=LaunchApp,HTTP in this qml plasmoid metadata.desktop is HTTP extension available in QML?

This is a little different in QML, you can load content from a http:// url in many components without this extension. We are not able to sandbox QML as we do with JavaScript, so our QML API, while being very similar to the JS one, is less restrictive.

Wether it works or not depends a little on the actual usecase, some properties (the image source, for example) "just work" with http (or QUrl, really).

I can't look into your code as the zip is filtered out by a virus scanner, but I believe this answer should help you. If not, let us know.

Cheers,

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to