Hi,

I have 3 file, 2 QML and 1 JS.

JS:

Qt Code:
  1. .pragma library
  2.  
  3. var totaltxt = 0;
  4. function totFunc(){
  5. totaltxt = totaltxt + 1;
  6. }
To copy to clipboard, switch view to plain text mode 

and first QML file includes text: Logic.totaltxt and so, it shows "0" as what we expect. However, although other QML file includes Logic.totFunc(); , it doesn't work. I mean, when second qml works, I expect new value must be 1 instead of zero.

I did all imports to do files.

Any idea?