Qt 6.11 is out! See what's new in the release
blog
Change colour of link of MarkdownText
-
Hello all,
Am wondering how to change the colour of the link within a Qml Text when rendered as MarkdownText. The example I have is:

I've tried to set
linkColorbut nothing seems to change?I've tried using all the Qml text objects such as
Text,TextArea,TextEdit, etc -
When parsing markdown color of links is set to value from global QPalette.
You can change it by modifying global QPalette:
QGuiApplication app(argc, argv); QPalette palette; QColor linkColor(Qt::red); palette.setColor(QPalette::Link, linkColor); app.setPalette(palette);but it will affect whole app and may lead to unwanted changes in other places.