Chapter 9. QSA Input Dialog Framework

The QSA Input Dialog Framework is a set of classes to enable the user to create dialogs using Qt Script. The QSA Input Dialog Framework provides two types of classes. The first types are the ones that can be used to build up complex input dialogs. These classes include, Dialog, CheckBox, GroupBox, LineEdit, TextEdit, etc. These classes each have a set of properties for describing how they appear and some of them also provide functions. The following is a simple example on how to use the Input Dialog Framework to create a dialog that will query the user for their first and last name, and echo the values they entered:
var dialog = new Dialog;
dialog.caption = "Name reading dialog";
dialog.okButtonText = "Done"
dialog.cancelButtonText = "Abort";

var first = new LineEdit;
first.label = "First name: ";
dialog.add( first );

var last = new LineEdit;
last.label = "Last name: ";
dialog.add( last );

if( dialog.exec() ) {
    var fullName = last.text + ", " + first.text;
    print( "Full name is: " + fullName );
}
Below is a list of the classes available from the Input Dialog Framework. Each class has a short description and a list of its properties and functions. For String properties the default is an empty string, and for Number properties the default is 0, unless stated otherwise.
CheckBox
The CheckBox widget provides a checkbox with a text label. CheckBox is an option button; it can be switched on (checked) or off (unchecked).