I create an AppButton then each time user click it, it change the text of the button to the next char/string in an array like this
import Felgo 3.0
import QtQuick 2.0AppButton{ id:questButton property var arrayOfChar = ['a', 'b', 'c', 'd', 'e', 'f'] property string testChar onClicked: { var numOfChar = entry.length var random = utils.generateRandomValueBetween(0, numOfChar-1) var testChar = entry[random] questButton.text = testChar } }
I guessed the text changing will happened easily but I got this errors V_Play_Desktop_Qt_5_11_1_MinGW-Debug/qml/QuestButton.qml:20: Error: Cannot assign [undefined] to QString. What wrong I have done and is there a more standard way to do like I said?