Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Bad antialized text shadow

    QML and Qt Quick
    1
    1
    153
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tatraian last edited by

      Hello,

      I tried to create a white text with shadow on yellow background. On my linux I get ugly text.

      Here is the example qml

      import QtQuick 2.11
      import QtQuick.Window 2.11
      import QtGraphicalEffects 1.0
      
      Window {
          visible: true
          width: 640
          height: 480
          Rectangle {
              id: background
              anchors.fill: parent
              color: "#f7dc16"
      
              Text {
                  id: text
                  anchors.verticalCenter: background.verticalCenter
                  anchors.horizontalCenter: background.horizontalCenter
                  color: "white"
                  font.bold: true
                  font.pixelSize: 22
                  text: "Hello World"
                  layer.enabled: true
                  layer.effect: DropShadow {
                      verticalOffset: 1
                      horizontalOffset: 1
                      radius: 0
                  }
              }
          }
      
          title: qsTr("Hello World")
      }
      

      In this case I get "green" lines at the left side of the rendered characters:
      0_1537374425158_Screenshot_20180919_182533.png

      Could you tell me, what I make wrong? Thanks:
      Antal Tatrai

      1 Reply Last reply Reply Quote 0
      • First post
        Last post