Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. qjsengine
    Log in to post

    • UNSOLVED Qt 6.2 alpha1 - calls order of invokable method.
      General and Desktop • javascript qjsengine • • Ricardo MAtos  

      2
      0
      Votes
      2
      Posts
      66
      Views

      Does it work in another way in Qt 6.1 or 5.15? Since you mention JavaScript, perhaps it's "trigger happy" attitude towards converting types is interfering here? To be absolutely sure which method will be called, use different method names.
    • SOLVED Qt 6.2 beta1 reciving qobject Pointer in c++
      QML and Qt Quick • javascript qjsengine • • Ricardo MAtos  

      2
      0
      Votes
      2
      Posts
      77
      Views

      Hops i forget to make the new object a type of already register with the newmetaonject
    • QJSEngine passing arguments back to c++
      General and Desktop • javascript qjsengine • • Ricardo MAtos  

      4
      0
      Votes
      4
      Posts
      120
      Views

      It was Nice to be able to register a meyatype converter and the QJSEngine convert for that object to a data type. Until now i create a class of QIcon and add and invokable method that returns *this. Like that i can recive on c++ a QIcon as reference Is there something that Im missing? If i create a object in c++ with QJSEngine::toScriptVale of a QIcon it works as well but like that i canto create a new object of that type and if i Change the value it chances for all c++ calls, in JavaScript is nota trivial to clone a object it was Nice to be able to clone it and fonte destroy the Last calls.
    • UNSOLVED System Level Testing with Qt
      General and Desktop • qjsengine qt test test automation • • itanitarek10  

      14
      0
      Votes
      14
      Posts
      402
      Views

      That's just a wild guess but you might be able to use Selenium as usual if your application is built for WASM. Otherwise, AFAIK, the reference tool is Squish.
    • UNSOLVED Promise exception is not pass to .catch method.
      QML and Qt Quick • javascript qjsengine promise • • Willie Huang  

      1
      0
      Votes
      1
      Posts
      212
      Views

      No one has replied

    • SOLVED QJSEngine cleanup/destructor
      General and Desktop • javascript qjsengine qt 5.12 cleanup destructor • • yah_nosh  

      14
      0
      Votes
      14
      Posts
      1514
      Views

      Anyone can contribute to the documentation, the code, etc. You have to follow the procedures and rules but it's not some walled garden.
    • UNSOLVED How to set dynamic Property for QJSEngine
      General and Desktop • qt5.5 qt5.6 qjsengine script qjsvalue • • NewMoon  

      3
      0
      Votes
      3
      Posts
      1192
      Views

      @NewMoon see QTBUG-38181 It's a known limitation of QJSEngine. If you can, switch to QScriptEngine (QML).
    • UNSOLVED How to create a QJSValue object of type Error
      General and Desktop • qjsengine qjsvalue • • pablo_worker  

      11
      0
      Votes
      11
      Posts
      3506
      Views

      @p3c0 Thank you for your help. The problem is that what I really want in the end is a way to catch errors thrown by C++ functions transparently to the user that writes JavaScript. So, the user can just write a script like: var X = myCppFunction(foo); var Y = myOtherCppFunction(bar); etc. And when it is executed (myEngine.evaluate) the errors are catched by the C++ code of my application. Something like: try { QJSValue theVal = myEngine.evaluate(the JavaScript script); if(theVal.isError) {//if there are errors in the JS code enter here} } catch( ) { // If there is an error in the Cpp functions called by the JS code enter here } I have seen in this post that this is not currently possible with QJSEngine. In addition, I have seen that a ticket is already open. Therefore, I will have to think something to get around and wait untill the functionality is implemented. Thank you for your help.
    • Announcing Qtesseract game server
      Announcements • qjsengine • • Illogica  

      1
      0
      Votes
      1
      Posts
      667
      Views

      No one has replied

    • UNSOLVED ECMAScript 6 Proxy support in QJSEngine
      QML and Qt Quick • javascript qjsengine proxy qtscript qscriptclass • • GE_MartinH  

      3
      0
      Votes
      3
      Posts
      1659
      Views

      Thanks for the reply, I will take this to the mailing list!
    • UNSOLVED Weird performance boost when calling QJSValue aliased property
      General and Desktop • performance qjsengine • • mjakubowski  

      1
      0
      Votes
      1
      Posts
      551
      Views

      No one has replied

    • SOLVED newFunction in QJSEngine missing
      General and Desktop • function qjsengine • • walteste  

      9
      1
      Votes
      9
      Posts
      4104
      Views

      @zerocom I had the same issue and your comment helped me to solve it. but this solution seems to be working for predefined number of arguments for invokable functions. is there any way to create an invokable function with variable argument number similar to what we used to do by QScriptContext?
    • Qt5.5 QJSEngine 很简单的一段js加法计算问题
      Chinese • qjsengine • • edgeofx  

      1
      0
      Votes
      1
      Posts
      1227
      Views

      No one has replied

    • QJSEngine add custom object
      General and Desktop • qjsengine qcustomplot qjsvalue • • TheHawk  

      8
      0
      Votes
      8
      Posts
      2976
      Views

      @TheHawk Have you tried giving argument to addGraph()? I don't remember whether the default argument translate well to javascript. If that still doesn't work, you can try to make add a dummy QObject class with Q_INVOKABLE functions to your engine to see if the problem is in your code or some possible interaction with QCustomPlot
    • [Solved]Call function in script
      General and Desktop • qt5.5 signal & slot javascript function qjsengine script qjsvalue • • TheHawk  

      2
      0
      Votes
      2
      Posts
      1910
      Views

      I managed using the following additional lines in CustomCode QString function = "test(1)"; QJSValue testfunction = myEngine.evaluate(function); qDebug() << testfunction.toString(); With my script CustomLogic.qs looking like this: function test(x) { var a = "tested!"; a = a + x.toString(); return a; } Returns "tested!1" in the application output
    • QJSEngine: Throw exceptions from OQbject's method that is called from script, and catch this exception in C++
      QML and Qt Quick • javascript qjsengine exception • • dimonomid  

      1
      1
      Votes
      1
      Posts
      1014
      Views

      No one has replied

    • QJSEngine: Q_INVOKABLE method that returns pointer to subclass of QObject
      QML and Qt Quick • javascript qobject qjsengine • • dimonomid  

      4
      1
      Votes
      4
      Posts
      5202
      Views

      Hi. I'm not sure I understand what you mean, but take a look here: http://doc.qt.io/qt-5/qtqml-javascript-imports.html#imports-within-javascript-resources It might help.
    • QJsEngine vs QScripEngine speed
      General and Desktop • qjsengine qscriptengine • • ivareske  

      1
      0
      Votes
      1
      Posts
      893
      Views

      No one has replied

    • Catching error thrown in C++ code in Js.
      General and Desktop • qjsengine • • stilgar  

      6
      0
      Votes
      6
      Posts
      3443
      Views

      @stilgar Hi; I am on the same situation. Did you solve ?