Our child views will be presented via a StackView component, which provides a stack-based navigation model with built-in history. New views (and views in this context means pretty much any QML) are pushed onto the stack when they are to be displayed and can be popped off the stack in order to go back to the previous view. We won’t need to use the history capabilities, but they are a very useful feature.
To gain access to the component, we first need to reference the module, so add the import to MasterView:
import QtQuick.Controls 2.2
With that done, let’s replace our Text element containing our welcome message with a StackView:
StackView { id: contentFrame initialItem: "qrc:/views/SplashView.qml" }
We assign the component a unique identifier contentFrame so that we can reference it elsewhere in the QML, and we specify which child view...