PDA

View Full Version : QtScript from diffrent files. How use script form diffrent files?



sergey_85
11th November 2009, 08:03
Hi!

I create app with QtScript support. And I need to use script from diffrent files!
For example I have two script files: 1.qs, 2.qs.
and I need to use some function from script file 1.qs in 2.qs file.


How to do it?

wysota
11th November 2009, 12:22
You need to evaluate 1.qs before you evaluate 2.qs (on the same engine). You can implement an "include" function that will load and evaluate 1.qs and call it from 2.qs.