No need to calculate the position, use linkActivated signal handler https://doc.qt.io/qt-5/qml-qtquick-text.html#linkActivated-signal