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

Not possible to style underline / border and text foreground independently with CSS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.0.0
    • GUI: Text handling
    • None

    Description

      Trying to customize the appearance of links, it's not possible to leave the link text color to foreground and have a custom underline or bottom border.

      import QtQuick 2.0
      
      Rectangle {
          width: 360
          height: 360
          Text {
              anchors.fill: parent
              wrapMode: Text.WrapAtWordBoundaryOrAnywhere
              textFormat: Text.RichText
              text: "<body><style>a:link {color: grey; text-decoration: none; border-bottom: solid blue 2px}</style>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur dapibus faucibus massa sed eleifend. Curabitur <a href='http://qt.nokia.com'>hendrerit est non mauris condimentum vitae aliquet urna</a> fermentum.<br><br>Vivamus scelerisque aliquam risus, nec lobortis tellus faucibus at. In in purus velit, at interdum est. Nullam vel tincidunt metus. Proin vitae purus nec purus consectetur luctus. Duis sit amet velit nisl, sit amet consequat nisl. Nullam eu tincidunt augue. Pellentesque nec mauris erat.<br><br>"
          }
      }
      

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            hhartz Henrik Hartz (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes