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. [Solved] Is it possible to achieve some kind of GLOW TEXT in QML?
Forum Updated to NodeBB v4.3 + New Features

[Solved] Is it possible to achieve some kind of GLOW TEXT in QML?

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 2 Posters 3.2k Views 1 Watching
  • 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.
  • I Offline
    I Offline
    inblueswithu
    wrote on last edited by
    #1

    Hi,

    While I was watching Oblivion (2013) Movie. I saw this "display ":http://picpaste.com/vlcsnap-2013-09-02-18h05m56s24-qqMT1eIU.png which has kind of glowing Text!
    Can we achieve that with QML?
    I dnt mean to use photoshop on some image. I want real text to be displayed like that!?

    Regards,
    inblueswithu

    1 Reply Last reply
    0
    • L Offline
      L Offline
      learc83
      wrote on last edited by
      #2

      I haven't used it with text. I'm not 100% sure it will work, but I think you can set the source to text.

      http://qt-project.org/doc/qt-5.0/qtgraphicaleffects/qml-qtgraphicaleffects1-glow.html

      1 Reply Last reply
      0
      • I Offline
        I Offline
        inblueswithu
        wrote on last edited by
        #3

        Woww... ! <3 u learc83. It did exactly what I needed.
        That was fast and perfect.
        Do you know which font is that in that picture in the 1st post?
        @import QtQuick 2.0
        import QtGraphicalEffects 1.0

        Item {
        width: 300
        height: 300

        Rectangle {
            anchors.fill: parent
            color: "black"
        }
        
        Text {
            id: butterfly
            text: qsTr("Butterfly")
        
            font.family: "Century Gothic"
            font.pointSize: 40
            color: "#b2f3ef"
        
            visible: false
            smooth: true
            anchors.centerIn: parent
        }
        
        Glow {
            radius: 8
            samples: 16
            color: "lightblue"
            source: butterfly
            anchors.fill: butterfly
        }
        

        }
        @

        1 Reply Last reply
        0
        • L Offline
          L Offline
          learc83
          wrote on last edited by
          #4

          Sorry, not sure about the font. You might want to post the picture on a typography forum.

          1 Reply Last reply
          0
          • I Offline
            I Offline
            inblueswithu
            wrote on last edited by
            #5

            I dnt know why this glow is not applying for a Rectangle element.
            Here is the code: http://pastebin.com/PL4dWWdM

            Any help?

            1 Reply Last reply
            0
            • I Offline
              I Offline
              inblueswithu
              wrote on last edited by
              #6

              yes, I found "this":http://doc-snapshot.qt-project.org/qt5-stable/qtgraphicaleffects/qml-qtgraphicaleffects1-rectangularglow.html for Rectangle glow. But I dnt know why it is making the corners rounded with out my consent. Guess it is due to the default cornerRadius property
              [quote author="inblueswithu" date="1378148099"]I dnt know why this glow is not applying for a Rectangle element.
              Here is the code: http://pastebin.com/PL4dWWdM

              Any help?[/quote]

              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