[SailfishDevel] Link in Text component

Martin Grimme martin.grimme at gmail.com
Sun Nov 10 09:03:05 UTC 2013


Hi,

2013/11/10, Tigre-Bleu <devel at tigre-bleu.net>:
> If a link is displayed in a Text component with html, it is displayed
> underlined with an ugly blue from the old internet ages...

You're right. It looks really ugly, and probably comes from the depths of Qt.
However, you can use rich text in Text or Label to fix this, e.g.:

        Label {
            color: Theme.primaryColor
            textFormat: Text.RichText
            text: "<style>a:link { color: " + Theme.highlightColor +
"; }</style>"
                  + "This text contains a <a href='#'>Link</a>"
        }


Cheers,
Martin


More information about the Devel mailing list