I have a QObject-derived class that looks like this: class TestObject : public QObject { Q_OBJECT Q_PROPERTY(QStringList contents READ contents WRITE setContents)
I have a program using QtScript for some automation. I have added a bunch of C++ functions and classes to the global scope of the script engine so that scripts can access them, like so:
I am doing something in Javascript and Qt, and for my purpose, I need a javascript object that inherits QWidget. So far, I have tried the following:
When I call this code: QScriptEngine e; e.evaluate(\"print(\'hello, world!\')\"); the output text (from print method) is written to main application\'s terminal.
I am familiar with web development so I know exactly what Javascript can do in webkit. If I want to employ the scripting feature in my apps, I think there are two ways:
I\'m trying to implement some kind of class hierarchy in JavaScript. I think I understood the prototype chain, but I still have to sort out the
It’s all the day that I’m trying to make this code working. It should be the same code presented in the QScript help page but unfortunately it doesn’t work at all!
Let\'s take the case of a simple class: QScriptEngine engine; class MyClass { public: QScriptValue foo(QScriptContext*, QScriptEngine*);
I am attempting to compile QtScriptGenerator (gitorious) with Visual Studio 2010 (C++) and have run into a compile error.In searching for a solution, I have seen occasional references to compile break
I want to pass an array of objects from my QtScript to C++ but I have not been able to figure out how to achieve this. As soon as I create an array, the elements inside it are converted to strings bef