function myFunction(x)
{
console.log(x.isLetter)
}
myFunction("s")
When I run this in a .qml file, it tells me that "isLetter" is undefined. Why?
http://qt-project.org/doc/qt-5/qchar.html#isLetter
You can't directly use Qt methods on JavaScript var, to do what you want prefer a pure js implementation:
x.match(/[a-z]/i);
No comments:
Post a Comment