Custom c++ main arguments in qtloader.js
-
Hi,
I have a webassembly Qt app using two main arguments for my
main.cpp. I have added the flag--emrunto my .pro file like this :QMAKE_LFLAGS += --emrunso, I am able to pass argument to the program via the url like this:
http://127.0.0.1:8000/?FIRSTARG&SECONDARGBut I don't like passing argument via the url, I would like to add them in the
.htmlor.jsif possible.I have seen this change who seems to make the job, so I tried to add :
Module['arguments'] = ["FIRSTARG", "SECONDARG"];at the same place in the
qtloader.jsbut without successIs it possible? Do you have any clues ?
PS : I am using Qt 5.14.2 with emscripten 1.38.27
-
Problem solved by removing the emrun flag. I can now specify custom arguments in the qtloader.js using emscripten's Module.arguments like this :
Module['arguments'] = ['FirstArg', 'SecondArg'];