C++ signal to QML slot in Qt
I want to send a Signal from C++ to a Slot in my QML File. I already got it working without and primitive type parameters, although if I want to send a QString to my QML Slot I get an error whilst connecting. I connect in main.cpp QObject *contentView = rootObject->findChild<QObject*>(QString("contentView")); QObject::connect(&myObj, SIGNAL(finishedGatheringDataForItem(QString)), contentView, SLOT(updateViewWithItem(QString))); the relavant part of my qml File Rectangle { objectName: "contentView" function updateViewWithItem(string) { console.log('got some Items'); } // slot } Error: Object: