|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# Default Prototypes Example

Files:

- script/defaultprototypes/code.js
- script/defaultprototypes/prototypes.cpp
- script/defaultprototypes/prototypes.h
- script/defaultprototypes/main.cpp
- script/defaultprototypes/defaultprototypes.qrc

This QtScript example shows how to use default prototypes.

With QScriptEngine::setDefaultPrototype() you can specify a QtScript object that defines a scripting interface for any C++ type. In this example, a simple scripting interface for QListWidgetItem is defined, so that the text of items can easily be accessed from script code.