QtScript Reference Documentation

Context2D Example

Using The HTML Canvas Element in a Web Browser

Using Qt Script to script a Canvas

The Context2D Class

Implementation

The Canvas Widget

The Environment

The Application Window

Creating Qt Script Extensions

Static Extensions

Default Prototypes Example

ECMA-262

ECMAScript Reference

The Global Object

Value Properties

Function Properties

Constructor Properties

Other Properties

Object Objects

Object Constructor

Function Properties

Object Prototype Object

Function Properties

Function Objects

Function Prototype Object

Function Properties

Array Objects

Array Constructor

Function Properties

Array Prototype Object

Function Properties

String Objects

String Constructor

Function Properties

String Prototype Object

Function Properties

Boolean Objects

Boolean Prototype Object

Function Properties

Number Objects

Number Prototype Object

Function Properties

The Math Object

Value Properties

Function Properties

Date Objects

Date Constructor

Function Properties

Date Prototype Object

Function Properties

RegExp Objects

RegExp Prototype Object

Function Properties

Error Objects

Error Prototype Object

Value Properties

Function Properties

The JSON Object

Function Properties

Hello Script Example

Translating the Application

JavaScript: The Definitive Guide

JavaScriptCore, version Snapshot from 2011-01-27

Evaluating Scripts

Engine Configuration

Script Exceptions

Script Object Creation

QObject Integration

Support for Custom C++ Types

Importing Extensions

Native Functions

Long-running Scripts

Garbage Collection

Core Debugging/Tracing Facilities

Qt Script

Licenses and Attributions

Scripting Classes

Language Overview

Basic Usage

Making a QObject Available to the Script Engine

Using Signals and Slots

Signal to Function Connections

Signal to Member Function Connections

Signal to Named Member Function Connections

Error Handling

Emitting Signals from Scripts

Overloaded Signals and Slots

Accessing Properties

Accessing Child QObjects

Controlling QObject Ownership

Qt Ownership

Script Ownership

Auto-Ownership

What Happens When Someone Else Deletes the QObject?

Customizing Access to the QObject

Making a QObject-based Class New-able from a Script

Enum Values

Conversion Between Qt Script and C++ Types

Default Conversion from Qt Script to C++

Default Conversion from C++ to Qt Script

How to Design and Implement Application Objects

Making a C++ object available to Scripts Written in Qt Script

Making C++ Class Member Functions Available in Qt Script

Making C++ Class Properties Available in Qt Script

Reacting to C++ Objects Signals in Scripts

Design of Application Objects

Returning QObject Pointers

Function Objects and Native Functions

Calling a Qt Script Function from C++

The <@keyword>this</@keyword> Object

Wrapping a Native Function

The QScriptContext Object

Processing Function Arguments

Formal Parameters and the Arguments Object

Checking the Number of Arguments

Checking the Types of Arguments

Functions with Variable Numbers of Arguments

Accessing the Arguments Object

Constructor Functions

Associating Data with a Function

Native Functions as Arguments to Functions

The Activation Object

Property Getters and Setters

Making Use of Prototype-Based Inheritance

Prototype Objects and Shared Properties

Defining Classes in a Prototype-Based Universe

Prototype-Based Programming with the Qt Script C++ API

Implementing Prototype Objects for Value-based Types

Implementing Constructors for Value-based Types

Managing Non-QObject-based Objects

Defining Custom Script Classes with QScriptClass

Error Handling and Debugging Facilities

Redefining print()

Using Qt Script Extensions

Internationalization

Use qsTr() for All Literal Text

Use String.prototype.arg() for Dynamic Text

Produce Translations

Apply Translations

ECMAScript Compatibility

Qt Script Extensions to ECMAScript

Qt Script Debugger Manual

Getting Started

Overview of Debugger Components

Resuming Script Evaluation

Resuming After an Uncaught Exception

Console Command Reference

Breakpoint-related Commands

break <location>

clear <location>

condition <breakpoint-id> <expression>

delete <breakpoint-id>

disable <breakpoint-id>

enable <breakpoint-id>

ignore <breakpoint-id> <count>

info breakpoints

tbreak <location>

File-related Commands

list <location>

info scripts

Execution-related Commands

advance <location>

continue

eval <program>

finish

interrupt

next <count = 1>

return <expression>

step <count = 1>

Stack-related Commands

backtrace

down

frame <index>

info locals

up

Scripting Classes and Overviews

Qt Script C++ Classes

License Information