Go to: Synopsis. Return value. Flags. MEL examples.

Synopsis

loadUI [-listTypes] [-uiFile string] [-uiString string] [-verbose] [-workingDirectory string]

loadUI is undoable, NOT queryable, and NOT editable.

loadUI command allows loading of a user interface created in Trolltech Qt Designer.
Some Qt classes have equivalents in Maya. If a widget's class is recognized, the Maya-equivelent will be created instead.
Any dynamic properties on a widget which start with a '-' character will be treated as a MEL flag/value pair. Similarly, any which start with a '+' will be treated as a Python flag/value pair. Such pairs will be applied to the widget upon creation.

Return value

string Full path name to the root control.

Flags

listTypes, uiFile, uiString, verbose, workingDirectory
Long name (short name) Argument types Properties
-uiFile(-f) string create
Full path to a user interface file to load.
-uiString(-s) string create
Load UI from a formated string.
-workingDirectory(-wd) string create
Sets the working directory, the loader looks for resources such as icons and resouce files in paths relative to this directory.
-verbose(-v) create
Extra information about created controls will be printed.
-listTypes(-lt) create
Returns the list of recognized UI types and their associated Maya command.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// Note: mydialog.ui must already exist
string $dialog1 = `loadUI -f "/users/username/mydialog.ui"`;
showWindow $dialog1;