I have this signal

class SystemUICfgScanner { /*code here*/ signals: void error(QString desc); /*more code*/ }; 

In QML I use an InfoBanner this way:

InfoBanner { property string infodetails: "" id: systemuicfgErrorBanner text: "Error: " + infodetails Connections { target: cfgScanner onError: infodetails = desc } } 

When error(QString) signal is emitted, I'm getting this error

Invalid write to global property "infodetails" 

What am I doing wrong?

Thanks in advance

2

1 Answer

Try to reference InfoBanner instance by id:

InfoBanner { property string infodetails: "" id: systemuicfgErrorBanner text: "Error: " + infodetails Connections { target: cfgScanner onError: systemuicfgErrorBanner.infodetails = desc } } 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy