qtscript
How to create an 'array-like' property that JS code can modify in place?
I have a QObject-derived class that looks like this: class TestObject : public QObject { Q_OBJECT Q_PROPERTY(QStringList contents READ contents WRITE setContents)[详细]
2023-03-28 12:07 分类:问答Deep copy of a QScriptValue as Global Object
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:[详细]
2023-02-11 02:29 分类:问答Javascript object that inherits QWidget
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:[详细]
2023-02-09 09:48 分类:问答QtScript output redirection
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.[详细]
2023-02-02 13:09 分类:问答Qt: what are the differences between QtScript and Javascript in Webkit
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:[详细]
2023-01-31 02:43 分类:问答Chaining constructors in JavaScript
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[详细]
2023-01-21 12:57 分类:问答Problems with QScript
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![详细]
2023-01-12 13:29 分类:问答Using a member function with QScriptEngine::newFunction
Let\'s take the case of a simple class: QScriptEngine engine; class MyClass { public: QScriptValue foo(QScriptContext*, QScriptEngine*);[详细]
2023-01-01 06:31 分类:问答STL operator= behavior change with Visual Studio 2010?
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[详细]
2022-12-29 19:31 分类:问答QtScript: Passing an array of objects to C++
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[详细]
2022-12-27 07:12 分类:问答