QtScript is a scripting engine that has been part of the
Qt cross-platform
Within computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several Computing platform, computing platforms. Some ...
application framework
In computer programming, an application framework consists of a software framework used by software developers to implement the standard structure of application software.
Application frameworks became popular with the rise of graphical user inte ...
since version 4.3.0. It was first deprecated as of Qt 5.5, then dropped as of Qt 6.5, and replaced by Qt Meta-object Language (
QML).
The
scripting language
In computing, a script is a relatively short and simple set of instructions that typically automation, automate an otherwise manual process. The act of writing a script is called scripting. A scripting language or script language is a programming ...
is based on the
ECMAScript
ECMAScript (; ES) is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is stan ...
standard with a few extensions, such as QObject-style signal and slot connections. The library contains the engine, and a
C++ application programming interface (
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
) for evaluating QtScript code and exposing custom QObject-derived C++ classes to QtScript.
The QtScript Binding Generator provides bindings for the Qt API to access directly from ECMAScript. QtScript and the binding generator are used for
Amarok 2's scripting system.
The QtScript version as of Qt 4.7 in 2011 uses
JavaScriptCore
WebKit is a browser engine primarily used in Apple's Safari web browser, as well as all web browsers on iOS and iPadOS. WebKit is also used by the PlayStation consoles starting with the PS3, the Tizen mobile operating systems, the Amazon ...
but was developed no further. The module was deprecated as of Qt 5.5 in April 2015.
Qt Script for Applications (QSA)
An earlier and unrelated scripting engine, named ''Qt Script for Applications'' (QSA), was shipped by Trolltech as a separate Qt-based library, dual-licensed under
GNU General Public License
The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
(GPL) and a commercial license.
With the release of QtScript, QSA has been deprecated and reached its end of life in 2008.
References
External links
Qt: Making applications scriptableQSA documentation (version 1.2.2)Last working snapshot of QSA homepage from archive.orgQSA download directory
{{ECMAScript
Free computer libraries
JavaScript dialect engines
Qt (software)