[Qt-interest] Noob Alert! / confused about Qt Script / QSA / KJS / Lua / Python etc..
Thiago Macieira
thiago at kde.org
Thu Oct 22 09:28:28 CEST 2009
Em Quinta-feira 22. Outubro 2009, às 07.52.37, Patrick escreveu:
> I am just learning QT and I am really just at an overview stage. There
> seems to be quite a few ways in which someone could extend their basic
> C++ code. Am I correct that QSA and KJS are now dead ends that are being
> replaced with Qt Script?
Correct.
QSA is a fork of an early version of KJS and was supplied to commercial
customers during Qt 3 times. In the meantime, KJS evolved and was forked again
by Apple, now being released as JavaScriptCore.
> If so is QT script ready for production use, it
> appears to be part of QT labs making me wonder if it is still beta
> software?
It's not in labs. QtScript was released as a production version back in Qt
4.3, about 2,5 years ago.
You may be confused about the recent news on QtScript's engine being merged
with that of JavaScriptCore. In a turnaround of events, the engine that was
written to replace QSA's engine (which was a fork of KJS) is being replaced
with another fork of KJS.
> Could I also extend an application with Lua or Python and do the same
> sort of things without using Qt Script? There are bindings for each
> which makes me wonder if someone could build a hybrid C++/PyQt(or Lua
> etc..) App. Are there benefits to each approach? I have been looking
> through the bindings page:
>
> http://techbase.kde.org/Development/Languages
>
> for some time but I can't seem to make out which approach is most
> popular. Sorry if this is an utterly stupid post, sometimes it is hard
> for me to ask a coherent question and find a way out of the dark when I
> am this confused-Patrick
Yes, you can extend any language with any other language, provided you have
the bindings and access to the interpreter.
QtScript only provides a JavaScript interpreter. The bindings (which are in
labs) are written in JS too.
PyQt and PySide are technically just bindings. They allow you to write a full
application in Python, but not really interact with it from the C++ side.
KDE's Kross library is a full two-way support. It allows you to expose a set
of Qt C++ objects to any number of languages (including JavaScript and Python)
and extend them in those languages.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091022/aa351cc5/attachment.bin
More information about the Qt-interest-old
mailing list