I connect a c++ signal to qml function in qt4.8.4. It's working fine but makes warning in application output as below:
Object::connect: No such slot QDeclarativeItem_QML_9::onValue_changed(double) Object::connect: (sender name: 'MyWidget')
I have defined qml slot like this :
import QtQuick 1.0
Item {
id: root
property real value : 0
Connections
{
target: controllerObject
onValue_changed :
{
root.value = value
}
}
}
And this is my c++ Signal and how it is connected to qml slot :
ui->view->rootContext()->setContextProperty("controllerObject",this);
ui->view->setSource(QUrl("qrc:/myQml.qml"));
ui->view->setStyleSheet("background-color: rgba(255, 255, 255, 0);");
ui->view->setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform | QPainter::HighQualityAntialiasing);
ui->view->setResizeMode(QDeclarativeView::SizeRootObjectToView);
connect(this,SIGNAL(value_changed(double)),(QObject *)ui->view->rootObject(),SLOT(onValue_changed(double)));
Why is it making that warning?
How to omit the warning?