Hello,
i want to use an function in qml what is written in an other qml file, but it won’t work
the example
the function is written in the file “function.qml” in an seperate directory called components
the function looks like this
function assign(id) {
value = id + 20
return: value;
}
now i work in another qml file it looks like that.
import “components/”
property int test: function.assign(number)
if i now run the qml I got an message in the qml-log “ReferenceError: Can’t find variable: function”
i don’t understand it. have someone an idea?
if i wrote the function in the same file it work.
can i call a function like this?
NOTE: this is just an example for the function
↧