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

Not possible to set color of visited hyperlink in QTextBrowser

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Out of scope
    • Affects Version/s: 4.3.3
    • Fix Version/s: Some future release
    • Component/s: GUI: Text handling
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

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

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes