user4520
user4520

Reputation: 3457

How can I select a href tags in a QTextBrowser from QSS?

I would like to format my clickable URLs inside a QTextBrowser. In a QSS file that I set for the entire application, I've tried QTextBrowser::text.a and QTextBrowser.a, but neither worked. Am I actually expected to manually format every link using the Qt Creator editor, or is there a way around this?

Upvotes: 0

Views: 446

Answers (1)

Frank Osterfeld
Frank Osterfeld

Reputation: 25155

You can’t use QSS for that, but QTextBrowser supports a subset of CSS, so you can make it part of the displayed HTML, or set a default stylesheet: QTextDocument::defaultStyleSheet.

Upvotes: 2

Related Questions