Root returns the root object being rendered. If the window was defined in QML code, the root object is the window itself.
()
| 889 | // |
| 890 | // If the window was defined in QML code, the root object is the window itself. |
| 891 | func (win *Window) Root() Object { |
| 892 | var obj Common |
| 893 | obj.engine = win.engine |
| 894 | RunMain(func() { |
| 895 | obj.addr = C.windowRootObject(win.addr) |
| 896 | }) |
| 897 | return &obj |
| 898 | } |
| 899 | |
| 900 | // Wait blocks the current goroutine until the window is closed. |
| 901 | func (win *Window) Wait() { |