Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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
@J-Hilk
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) }