Solved Can't QML send rect type to c++?
-
error:No suck signal when I replace the string with rect in the follow code.
QObject* pObj = (QObject*)pQuickWidget->rootObject(); connect(pObj,SIGAL(sendRect(QRect)),this,SLOT(onRecvRect(QRect)))
Item{ signal sendRect(rect rct) }
-
@mirro said in Why are error:No suck signal when signal sent with rect param from QML into C++:
SIGAL
I did not test but did you forget a N ? SIGAL -> SIGNAL ?
-
@mirro Is item the root object, possibly not,
please post more code
-
My test results are of type String and there is no problem
//c++ QQuickWidget* pQuickWidget = new QQuickWidget(this); QObject* pObj = (QObject*)pQuickWidget->rootObject(); connect(pObj,SIGNAL(sendRect(QString)),this,SLOT(onRecvRect(QString))) //qml Item{ signal sendRect(string strRct) }
-
This post is deleted!