November 21, 2010

doforumda doforumda
Lab Rat
161 posts

using jquery instead of javascript with qml help

 

hi
i want to know can we use jquery library with qml? I mean to ask that when i want to access data for example from xml file or any other thing, i can use XMLHttpRequest. but what i i want to use jquery library function like $.ajax().

thanks

7 replies

November 21, 2010

Kxyu Kxyu
Lab Rat
139 posts

I don’t think it’s actually possible, but you can try to extract functions and objects you need

November 22, 2010

doforumda doforumda
Lab Rat
161 posts

how is it possible to extract functions and object? I mean how can i do this?

November 22, 2010

Kxyu Kxyu
Lab Rat
139 posts

well it’s actually can be complicated
you should look up what you need in jquery source and copypaste it to a new js file. you may need to remove some code, special for web, for example DOM refernces etc. also i doubt that $ will work

November 23, 2010

imxiangpeng imxiangpeng
Lab Rat
2 posts

In qml, you can access C++ coding, you can achieve the purpose using C++

August 8, 2011

reedwine reedwine
Lab Rat
3 posts

so then we can use c++ code to read jquery lib correct?
any tutorial about this?
thanks before

August 8, 2011

Denis Kormalev Denis Kormalev
Lab Rat
1607 posts

jQuery is browser-oriented js library. I really doubt that it is possible to port it to qml. You can use c++ not to use jquery, but to implement similar methods in c++ and use them in qml.

November 25, 2011

peppelorum peppelorum
Lab Rat
2 posts

I just finished a small library so I don’t have to handcraft all my ajax requests, you can find the library at https://github.com/peppelorum/ajaxmee
If you use it please let me know, if you find any bugs, please file a bug at github, or even better, fork it and pull request.

 
  ‹‹ Release - qtcore4.dll checksum error      Qt::CursorShape + QML ››

You must log in to post a reply. Not a member yet? Register here!