QtScript is an ECMA262-compatible implementation of JavaScript. It is the successor of QSA (Qt Script For Applications), but is being phased out in recent Qt versions in favour of Google's V8 engine.
Questions tagged [qtscript]
116 questions
2
votes
1 answer
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:
Employ qtwebkit and open a hidden webpage running my own Javascript…

Mickey Shine
- 12,187
- 25
- 96
- 148
2
votes
1 answer
Qt Script Multithreading
I need to run multiple (up to 50 or more) Qt Script Functions concurrently. Running two or three Threads with Script Functions works just fine, but as soon as I run around 50 Threads, I get an Error and my Program crashes.
ASSERTION FAILED:…

Korboh
- 23
- 3
2
votes
0 answers
Migration from QScriptEngine to QJSEngine
I'm migrating QScriptEngine code over to QJSEngine.
Now, I have:
class pars
{
public:
static QScriptValue PrintMainLog(QScriptContext* c, QScriptEngine* e);
};
QScriptValue pars::PrintMainLog(QScriptContext* c, QScriptEngine* e)
{
//some…

Aksandr
- 21
- 2
2
votes
1 answer
Error passing custom Object from QtScript to C++
I have written a custom class which is available in QtScript through a Prototype. Also another global class is available which should be used to print the custom class generated in QtScript.
This is my custom class (very simple ;) ):
class…

Tobias
- 737
- 1
- 9
- 20
2
votes
0 answers
How to instantiate my C++ class from QtScript? My class inherits QObject
I am researching possibilities of QtScript. I understand that it is possible to create QObject in C++ and then pass it into QScriptEngine:
QObject *someObject = new WindowWithText;
QScriptValue objectValue =…

Tomáš Zato
- 50,171
- 52
- 268
- 778
2
votes
1 answer
Result of QJSEngine evaluation doesn't contain a function
I'm migrating QScriptEngine code over to QJSEngine, and have come across a problem where I can't call functions after evaluating scripts:
#include
#include
int main(int argc, char *argv[])
{
QCoreApplication a(argc,…

Mitch
- 23,716
- 9
- 83
- 122
2
votes
0 answers
QJSEngine vs QtScript and QList
Since Qt 5.5 is actual, QtScript is deprecated. The replacement is Qt QML with QJSEngine. Now, I will rewrite my project to the new engine. I have some Classes like:
class Node : public QObject
{
Q_OBJECT
Q_PROPERTY(QList childs READ…

Rico
- 33
- 1
- 1
- 8
2
votes
2 answers
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*);
MyClass();
};
QScriptValue MyClass:foo(QScriptContext* context, QScriptEngine* eng) {
…

Rohan Prabhu
- 7,180
- 5
- 37
- 71
2
votes
2 answers
Functions connected to signals in QtScript (on Qt 4.5.2) are not firing
I've injected into a proprietary Qt (4.5.2) application, added my own compatible build of QtScript, and have managed to get access to all the signals I need. However, when connecting to them (via QtScript) my functions are never called.
I've come…

Serafina Brocious
- 30,433
- 12
- 89
- 114
2
votes
2 answers
Pop up dialog to save file in seperate thread
I have a function that gets called in a separate thread from the main one when a button gets clicked and it calls the QFileDialog::getSaveFileName() function to get a file handle to the file the user saved, but I can't do that on a separate thread…

user2584587
- 133
- 2
- 10
2
votes
1 answer
QML access to non invocable functions
I need access to functions that wasn't marked as Q_INVOKABLE nor Q_SLOTS.
Qt script module has mechanism called defaultPrototype. I wonder if it possible in QML?
I saw QtDevDays presentatin QtDD12 - QtQuick under the hood - Thomas McGuire and at 18…

Nightmare
- 63
- 1
- 7
1
vote
1 answer
I need to write a script for Eiskalt DC++ in QTscript. How do I start learning to use Qtscript?
I do not know Javascript and have never used Qt. I do use c++ but I don't think that is much help? It is a pretty simple script but I can't find any tutorial etc for Qtscript.

chinchin
- 271
- 5
- 16
1
vote
2 answers
QtScript and threads
I want to run several concurrent jobs from QtScript script:
function job1() { ... }
function job2() { ... }
runConcurrentJobs(job1, job2)
The jobs a essentially sequences of remote procedure calls (ZeroC Ice), which need to synchronize at several…

Begemoth
- 1,389
- 9
- 14
1
vote
2 answers
Qt Qvariantlist conversion into javascript array unsuccessful
I'm currently create an apps in Meego using QML and JS on most of the part. and now I stumbled upon a problem.
From javascript I want to call a C++ function to read text file, parse it, and then return an array of the parsing result.
so I create a…

Fugogugo
- 4,460
- 10
- 36
- 50
1
vote
1 answer
TeXstudio macro script : how to move the cursor to specified position?
For example, I want to write the following macro in script in TeXstudio(using QtScript):
%SCRIPT
editor.write("\\textcolor{red}{}")
After invoking this macro, I want the cursor to move into the second pair of curly braces automatically. How can…

Deler
- 61
- 5