We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question
I want to export object to Qml by SetContextProperty, but qml report error on console:
xxx.qml: TypeError: Cannot read property 'transString' of null
detail
I have a class declare like this:
public class Trans { [NotifySignal("currentLangChanged")] public string currentLang { get; set; } = "English"; [NotifySignal("transStringChanged")] public string transString { get; set; } = ""; [NotifySignal("languagesChanged")] public List<string> languages { get; set; } .... public void loadFolder(string folder) { .... } }
I want to call loadFolder in c# not qml, so i use SetContextProperty in main function
static int Main(string[] args) { ... var trans = new Trans(); trans.loadFolder(Config.Config.transPath); engine.SetContextProperty("trans", trans); ..... }
source code
https://github.com/jaredtao/TaoQuick.Net
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to export object to Qml by SetContextProperty, but qml report error on console:
I have a class declare like this:
I want to call loadFolder in c# not qml, so i use SetContextProperty in main function
https://github.com/jaredtao/TaoQuick.Net
The text was updated successfully, but these errors were encountered: