Warning, /sdk/cutehmi/extensions/CuteHMI/Examples/Console.0/README.md is written in an unsupported language. File is not indexed.
0001 # Console Example 0002 0003 This extension can be used to demonstrate basic usage of [cutehmi.console.0](../../../../tools/cutehmi.console.0/) tool. 0004 0005 To run the example use following command. 0006 ``` 0007 cutehmi.console.0 CuteHMI.Examples.Console.0 0008 ``` 0009 0010 The example defines very simple QtObject-based `Console` component, which looks as follows. 0011 0012 \snippet Console.qml QtObject 0013 0014 This component is instantiated by [cutehmi.console.0](../../../../tools/cutehmi.console.0/) tool and it can be queried from the 0015 command line. Let's ask for its `book` property. 0016 ``` 0017 # book 0018 cutehmi.console.0: QVariant(QString, Mein Kampf by Adolf Hitler) 0019 ``` 0020 0021 We can call `tell()` function as well. 0022 ``` 0023 # tell() 0024 qml: I highly recommend the book Mein Kampf by Adolf Hitler! 0025 ``` 0026 0027 If you don't like this book the `book` property can be altered from the command line. 0028 ``` 0029 # book = "The Star Diaries by Stanislaw Lem" 0030 ``` 0031 0032 Now `tell()` function yields. 0033 ``` 0034 # tell() 0035 qml: I highly recommend the book The Star Diaries by Stanislaw Lem! 0036 ``` 0037 0038 To finish the console session type `\q`. 0039 0040 \example Console.qml 0041 Here is a complete listing of the example source file.