onFontChanged: {
console.log("new pointSize : ", myText.font.pointSize)
console.log(" myText height: ", myText.height)
console.log(" main height: ", main.height)
console.log(" height: ", height)
}
onFontChanged refers to the Rectangle with “id: main”. You don’t have to call to the parent.height property.
Edited: I’ve read again and I don’t answer your question, I’ll look at it.
Edited2: Try this.
font {
family: "Arial"
}
Component.onCompleted: myText.font.pointSize = 0.10 * myText.height
↧