This demo contains an OOP wrapper library for QtWidgets xtra (as castlib "qt"), and shows how to use it. In addition to providing an OOP interface, it also adds some other useful stuff: - The original symbol-based callObject/callWidget... API feels unnatural and sucks ;) - Using the OOP API means that at authoring time errors are shown for non-existant methods or signals (e.g. because of typos), while they fail silently when using the original symbol-based API. - All callbacks (created by method "connect") are automatically "detached" from the xtra generated thread, and are therefor fully debuggable. - Qt constants (integers, needed all over the place) can be referenced by name (under namespace $.Qt and sub-namespaces). - Qt events (integers) can be referenced by name (under namespace $.Qt.Event) To use the wrapper library in your own projects, the following 2 steps are required: 1. Attach castlib "qt.cst" to your movie (or copy its contents into an internal castlib named "qt", if you prefer) 2. In your prepareMovie or startMovie handler, add the following 2 lines: _global.$ = [:] _global.$[#Qt] = script("Qt", "qt").new() Done. Now you can completely forget about QtWidgets xtra's original interface (based on symbols), but instead create and use Qt widgets/dialogs/objects in an OOP way, by creating instances and then calling their methods. All available widgets/dialogs/objects are available under the namespace "_global.$.Qt". A minimal "Hello world!" code example: global $ win = $.Qt.MainWindow.new() win.setWindowTitle("Hello world!") win.connect($.Qt.Event.Close, _movie, #halt) win.show()