May 13, 2011

2beers 2beers
Lab Rat
149 posts

QtScript future

 

hi everyone. I just read the the following post on the labs blog about qt modules. I currently started an application that is based on a large proportion on qtscript. however I see this today:

  1. QtScript
    Overall module state: Active/Maintained QScriptEngineAgent and related classes State: Deprecated Reasoning: flawed design, being replaced by a better design.

So what do you recommend me? To wait for a better implementation, is this gone be 100% change, or only small changes that will not be so hard to port my application to future versions of qt.

Thanks in advance

7 replies

May 13, 2011

Tobias Hunger Tobias Hunger
Robot Herder
3387 posts

Do you use the QScriptEngineAgent class? That is the one that is deprecated (as I read the text you pasted). The rest of QtScript is active and maintained.

What exactly are you afraid of?

May 13, 2011

Andre Andre
Robot Herder
6417 posts

Just for reference: this [labs.qt.nokia.com] is the blog posting that is being referenced.

May 13, 2011

kidproquo kidproquo
Lab Rat
110 posts

The list is also now on the wiki [developer.qt.nokia.com]

May 13, 2011

2beers 2beers
Lab Rat
149 posts

I’m using scriptUnload() [doc.trolltech.com]

I’m not afraid, but I’m currently in the begining stage with my project and I’m 100% sure I want to port it to qt 5 when will be ready. That’s why I asked?

May 13, 2011

Andre Andre
Robot Herder
6417 posts

QtScript itself is not, and certainly will not be, depreciated. It is a core part of Qt, and needed for QML. If anything, you can expect it to get more love than it used to get. In Qt5, it will be based of the V8 engine, bringing big performance gains.

April 17, 2013

jacmoe jacmoe
Lab Rat
1 posts

QtScript will indeed be deprecated, according to the status of the V8 port: it was abandoned because QtScript exposes too much for it to be feasible to be powered by V8.
The successor will be minimal and focus on QML.

At least that’s what this says:
QTBUG-12503: Evaluate the technical feasibility of using V8 for Qt Script [bugreports.qt-project.org]

The conclusion is that it’s not feasible. Qt 5 will use Google’s V8 JavaScript engine, but the existing QtScript API is not a viable abstraction layer for it. QtScript simply exposes too many implementation details to be reasonably supported on top of V8 (without heavy forking).

The intent is to introduce a new, minimal Qt/C++ scripting API on top of V8 for Qt 5 that’s focused on serving QML/JS integration.

I am posting this comment for the benefit of other who, like me, found this topic from a Google search. :)

April 19, 2013

chuckshaw chuckshaw
Lab Rat
10 posts

Checkout Qt5’s QJSEngine. Scripting is not only for QML.

 
  ‹‹ Custom slider initialization and interval problem      Open file with ostream with file name from QFile? ››

You must log in to post a reply. Not a member yet? Register here!