Any QML component requires an environment where it should be instantiated. Such an environment is the sum of a QQmlContext (http://doc.qt.io/qt-5.9/qqmlcontext.html), which is responsible for exposing data to the QML component, and a QQmlEngine (http://doc.qt.io/qt-5.9/qqmlengine.html), which is responsible for instantiating the component and managing a hierarchy of QQmlContexts. The QQmlContext manages property bindings and contextual properties like the C++ object instances we want to expose to the QML UI.
Looking at GUI's main.cpp, you'll see that Qt Creator's application template created these two lines of code for us:
In the first ...