What is the correct way to map Qt data types in JavaScript. I pass a Qt object to JavaScript that I load in the QWebView control. It's not a problem to call an object method from JavaScript if there's no parameters buf if a method has parameters the code doesn't work. For example I have the structure Location:
struct Location
{
QString country;
QString city;
};
I have the method:
void UpdateLocation(const Location& loc开发者_StackOverflowation);
How to call this method from JavaScript?
How to call this method from JavaScript?
Location should inherit from QObject
struct Location : pubilc QObject {
Q_OBJECT
精彩评论