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) }
-
@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) }