|Home | Tutorial | Classes | Functions | Qt Scripter | Language | Library | Qt API | QSA Articles | Qt Script for Applications | ![]() |
[Prev: Qt] [Home] [Next: Built-in Variables and Constants]
The System object always exists in a Qt Script program. Use the System object to access and manipulate environment variables, e.g. with getenv(), setenv() and unsetenv(), and to print text to the console with print() and println().
getenv( environmentVariable )
Returns the string stored in the given environmentVariable.
Example:
var q = System.getenv( "QTDIR" ); // q == /usr/local/qt
See also setenv() and unsetenv().
print( expression )
Prints the expression (applying toString() if necessary) to the console (stdout).
print( expression )
Prints the expression (applying toString() if necessary) to the console (stdout), followed by a newline.
See also debug().
setenv( environmentVariable, value )
Sets the environmentVariable to the value. If the environmentVariable does not exist it is created. The environment is only changed within the context of the Qt Script for Applications process for the duration of the process.
See also getenv() and unsetenv().
unsetenv( environmentVariable )
Removes the environmentVariable from the Qt Script for Applications process's environment. The environment is only changed within the context of the Qt Script for Applications process for the duration of the process.
See also getenv() and setenv().
[Prev: Qt] [Home] [Next: Built-in Variables and Constants]
Copyright © 2001-2003 Trolltech | Trademarks | QSA version 1.0.0-beta2
|