Then we can have the onClicked signal of a Button call our "phrase2 ()" function
Function Defined in a Separate .js File
Next in your QML file declare the .js file
Now you can call that function inside of a Button onClicked signal by doing the following
I like to use defined functions within the QML for longer/used multiple times within that one QML file functions. And I like to use functions defined for very long or functions that will be used in multiple QML files.
CrackBerry is in no way Affiliated with BlackBerry. We take pride in our unbiased content, however do occasionally receive free products from vendors that we review or discuss. For more info click here.