Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to replace the effect property of the Text element [SOLVED]
QtWS25 Last Chance

How to replace the effect property of the Text element [SOLVED]

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 928 Views
  • 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.
  • B Offline
    B Offline
    Bidochon
    wrote on last edited by
    #1

    I noticed that in previous version of QML, it was possible for example to blur some text such as

    @
    Rectangle {
    width: 400
    height: 200
    color: "lightblue"

    Text {
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.verticalCenter: parent.verticalCenter
        text: "Qt Quick"; font.pixelSize: 64
        effect: Blur { blurRadius: 5 }
    }
    

    }
    @

    I can't find the blur property anymore. How can we achieve the same effect?

    Thanks

    1 Reply Last reply
    0
    • M Offline
      M Offline
      madoodia
      wrote on last edited by
      #2

      hi
      first of all you should import: import QtGraphicalEffects 1.0
      http://qt-project.org/doc/qt-5/graphicaleffects.html
      and then use FastBlur Type:

      @import QtQuick 2.0
      import QtGraphicalEffects 1.0

      Item {
      width: 300
      height: 300

      Text {
          id: text
          anchors.horizontalCenter: parent.horizontalCenter
          anchors.verticalCenter: parent.verticalCenter
          text: "Qt Quick"; font.pixelSize: 64
      }
      
      FastBlur {
          anchors.fill: text
          source: text
          radius: 32
      }
      

      }@

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Bidochon
        wrote on last edited by
        #3

        So I guess what used to be the effect method inside text/image..etc, is now its own Element.

        Thanks a lot madoodia.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved