Docs: add a note that only exported global from the main file are exposed

This commit is contained in:
Olivier Goffart 2022-02-09 14:48:57 +01:00
parent d6e835d4ff
commit 3d209287c2
4 changed files with 18 additions and 3 deletions

View file

@ -84,7 +84,10 @@ public:
/// Sets the callback handler for the `hello` callback.
template<typename Functor> inline void on_hello (Functor && callback_handler) const;
// Returns a reference to a global singleton that's exported.
/// Returns a reference to a global singleton that's exported.
///
/// **Note:** Only globals that are exported or re-exported from the main .slint file will
/// be exposed in the API
inline template<typename T>
const T &global() const;