hi,
how to receive signal from c++ to qml....using qdeclarativeview i am able to bind qml with c++ but i don't know how to bind c++ with qml....
hi,
how to receive signal from c++ to qml....using qdeclarativeview i am able to bind qml with c++ but i don't know how to bind c++ with qml....
Expose a C++ object to QML engine using QDeclarativeContext::setContextProperty() and use one of the means available (either the Connections element or javascript object.signal.connect(slot) expression) to connect a QML function to such object's signal.
thank you for your reply,
here i am using qml for ui and c++ for database ....whenever i retrieve data from c++.... i want to give to qml..
You might want to consider exposing the data as a model.
Maybe you can even use QSqlQueryModel?
Cheers,
_
Last edited by anda_skoa; 8th May 2013 at 15:12.
thank you for your reply,
but error is comming like this,
QMetaObject::invokeMethod: No such method QDeclarativeRectangle::myQmlFunction(QVariant)
QML function returned: ""
thank you for your reply,
but error is comming like this,
QMetaObject::invokeMethod: No such method QDeclarativeRectangle::myQmlFunction(QVariant)
QML function returned: ""
Bookmarks