E
E
Evgeny Yakushov2021-02-01 12:10:25
Qt
Evgeny Yakushov, 2021-02-01 12:10:25

How to process data using QJSEngine?

Good day to all! Started working with QJSEngine to change file data dynamically. At the moment, I figured out how to dynamically load a script from a file. The next stage is data processing on the script. Ideally, this is to pass the file name for processing and process using JS. (Let's invert the bytes in the file). I ran into a problem that I can't even open this file (FileReader), let alone write something to the file.

There is another option, transfer the data to the script, process it and return it back for further writing to the file, but the problem is that the files are 2GB each.

Tell me what and how is better, if possible with an example or where to look.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2021-02-01
@yevgenyyakushov

I did not work with the module, but as far as I understand, he does not know how to do this. It doesn’t even know how to console.log by default, such functionality is connected explicitly:

QJSEngine provides a compliant ECMAScript implementation. By default, familiar utilities like logging are not available, but they can be installed via the installExtensions() function.

And I would advise you to write the data inversion in a 2 GB file in C ++ .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question