Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-1670

Not possible to set color of visited hyperlink in QTextBrowser

XMLWordPrintable

      It is not possible to set color of visited hyperlinks in a QTextBrowser, despite the documentation indicating otherwise. QPalette has the Link and LinkVisited color roles, but the documentation for these say:

      "Note that we do not use the Link and LinkVisited roles when rendering rich text in Qt, and that we recommend that you use CSS and the QTextDocument::setDefaultStyleSheet() function to alter the appearance of links."

      However, the CSS support in Qt does not support the :visited pseudo-class, so it is still not possible to set the color of visited hyperlinks.

      Note: This requires also new API for querying of the status of a link (visited or not). Also note that QtWebKit in Qt 4.4 provides API for this.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            srutledg Shawn Rutledge
            sthomass Stian Sandvik Thomassen (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes