Excellent, bindings on C++ properties is definitely the way to go.
Way more elegant than making C++ code dependent on QML code.
Can you show such a function and where the objects are defined?
For example your gpsOneShotUpdate() function should be fine if there is an object with id mainWin in the same file or a property with the name mainWin in the object the function is in.
import allows you access to types, just like includes in C++.
The current directory, i.e. the directory the current QML file is in, is always implicitly imported.
In your case you don't need to import SubPages in main.qml since you are using a Loader, you are not instantiating objects of these types directly in QML code.
Access to objects has nothing to do with imports.
Page1 is not a valid id nor a valid property name (both need to start with a lower case letter).
Cheers,
_






Reply With Quote

Bookmarks