Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to change font.pointSize with animation?
Qt 6.12 LTS is out! See what's new in the release blog

How to change font.pointSize with animation?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 910 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.
  • M Offline
    M Offline
    Mayron
    wrote on last edited by
    #1

    I need this Text to change the size value every 10 seconds with animation.

    Text {
    id: time
    x: 765
    y: 15
    color: "#fff"
    font.pointSize: 25
    visible:true
    }

    jsulmJ 1 Reply Last reply
    0
    • M Mayron

      I need this Text to change the size value every 10 seconds with animation.

      Text {
      id: time
      x: 765
      y: 15
      color: "#fff"
      font.pointSize: 25
      visible:true
      }

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Mayron https://doc.qt.io/qt-5/qml-qtquick-animation.html maybe?

      Text {
      id: time
      x: 765
      y: 15
      color: "#fff"
      font.pointSize: 25
      NumberAnimation on font.pointSize {
              running: myMouse.pressed
              from: 8; to: 25
          }
      visible:true
      }
      

      You would need to change running: part.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      4
      • jsulmJ jsulm

        @Mayron https://doc.qt.io/qt-5/qml-qtquick-animation.html maybe?

        Text {
        id: time
        x: 765
        y: 15
        color: "#fff"
        font.pointSize: 25
        NumberAnimation on font.pointSize {
                running: myMouse.pressed
                from: 8; to: 25
            }
        visible:true
        }
        

        You would need to change running: part.

        M Offline
        M Offline
        Mayron
        wrote on last edited by
        #3

        @jsulm thanks, It worked!!

        1 Reply Last reply
        1

        • Login

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