ScrollView {
id: scroll
width: parent.width
height: parent.height
contentWidth: width
contentHeight: col.height
Column {
id: col
width: parent.width
anchors.fill: parent
TextArea {
id: text
readOnly: true
width: parent.width
textFormat: Text.RichText
selectByMouse: true
}
}
Component.onCompleted: {
let i = 100;
text.cursorPosition = i;
text.moveCursorSelection(i+10, TextEdit.SelectCharacters);
//How to get the Y corrdinate of the current selection text? Then I would like scroll to the corresponding position.
let y = 0;
}
}