I'm trying to call my own function to add an image source. The code is similar to this:
function pics()
{
var source = "file:/home/nabil/Downloads/4.png"
if (ident === "Nabil") {
source = "qrc:images/Plane1.png" ;
}
return source;
}
Image
{
id: myIDImage
source: myIDImage.pics() //here I am calling my function
x: 0
y: 0
width: 30
height: 30
}
Can anyone please tell me the way of calling my own function?