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

QML: palette.link and palette.linkVisited not working as expected

    XMLWordPrintable

Details

    Description

      Palette properties to change the color of link and color of a visited link are not working as expected and mentioned in https://doc.qt.io/qt-5/qml-palette.html

      import QtQuick 2.14
      import QtQuick.Window 2.14
      import QtQuick.Controls 2.14
      
      Window {
      visible: true
      width: 640
      height: 480
      title: qsTr("Hello World")
      
          Rectangle {
              anchors.fill: parent
              TextArea {
                  anchors.fill: parent
                  textFormat: TextEdit.RichText
                  palette.link: "red"
                  palette.linkVisited: "green"
                  text: '<a href="http://google.com">This here</a>'
                  readOnly: true
                  onLinkActivated: Qt.openUrlExternally(link)
              }
          }
      }
      

      Please find the attached sample, where link color is not impacted by these properties.

      Attachments

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

        Activity

          People

            vitaly.fanaskov Vitaly Fanaskov
            shmittal Shveta Mittal (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes