Connecting QML signals with Qt slots.
Hi! I have such code:
- Item {
- signal itemClicked()
- MouseArea {
- anchor.fill: parent
- onClicked: itemClicked()
- }
- }
Can I connect itemClicked() to slot in cpp application?
- QDeclarativeEngine *engine = new QDeclarativeEngine;
- QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(myObject);
connect() retuns true, but it doesn’t work.
5 replies
see if this [wiki.forum.nokia.com] helps
Hi,
Could you add a bug report on http://bugreports.qt.nokia.com with a small example to reproduce the problem?
Thanks,
Michael
I’ve tried this feature in a simple project and it works. So the mistake somewhere in the my test app.
P.S. You can see this code example [fileconvoy.com].
Maybe you are know what’s wrong :)
You must log in to post a reply. Not a member yet? Register here!






