You can use context properties for this. You would be writing something like this:
...
MyClass myClassObject;
QQuickView view;
view.rootContext()->setContextProperty("myClassContextProperty", &myClassObject);
view->setSource(QUrl::fromLocalFile("main.qml"));
view->show();
...
and then you could access it in qml as follows:
Button {
onClicked: myClassContextProperty.x = 100
}