There are a couple of options to do something like that.

The easiest way is to create an instance of a QObject derived class in C++ and use QQmlContext::setContextProperty() to make that instance accessible from QML.
The context itself can be retrieved from the QQmlEngine of the QQuickView.

Cheers,
_