Vote count:
0
I have created a js file for storing constants inside assets/Model/constant.js I had a view inside assets/homeview.qml. This homeview.qml imports
import "Model/constant.js" as Global
and I could access Global.myConstant
with no error.
Now I moved the homeview.qml inside a folder. assets/Views/homeview.qml and changed the import location to
import "/Model/constants.js" as Global
but now Global.myConstant
shows unknown variable myConstant error. Is there something else I need to do when I move file inside a folder?
asked 1 min ago
Accessing global variable in multiple qml files in blackberry cascades 10
Aucun commentaire:
Enregistrer un commentaire