我有这个信号
class SystemUICfgScanner
{
/*code here*/
signals:
void error(QString desc);
/*more code*/
};
在 QML 中,我以这种方式使用 InfoBanner:
InfoBanner
{
property string infodetails: ""
id: systemuicfgErrorBanner
text: "Error: " + infodetails
Connections
{
target: cfgScanner
onError: infodetails = desc
}
}
发出错误(QString)信号时,我收到此错误
Invalid write to global property "infodetails"
我究竟做错了什么?
提前致谢