If you have a
TabView in your QML file and you want to call a
Tab’s function of that tab view, you might run into a problem If you try to call it directly
like you would any other function. This is because
Tab does not inherit from
Item, it inherits from
Loader. So you would need the
item property of the
Tab to call a function or acces a property of it.
Let’s say you have the following code in your QML file.
Loader, the way you access the
myFunc function is like this:
EDIT: @AkiHydway mentioned that
Tab must be loaded, other wise
item will be undefined, since it inherits
Tabs have lazy initialization, so it will not be loaded unless you specifically tell it to load or you activate the
Tab by clicking on it. Thanks for the suggestion @AkiHydway!