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. [Porting to Qt5] Animation of Text unexpectedly twinkles
Forum Updated to NodeBB v4.3 + New Features

[Porting to Qt5] Animation of Text unexpectedly twinkles

Scheduled Pinned Locked Moved QML and Qt Quick
10 Posts 3 Posters 3.0k 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.
  • W Offline
    W Offline
    weiyuemin
    wrote on last edited by
    #1

    I'm trying to port my old QML files to Qt5. The following code has a moving animation, but unexpectedly twinkles.
    When it was in Qt4.8.3, everything goes well.
    Can anyone help?

    Thank you very much !!

    @
    import QtQuick 2.0

    Rectangle {
    id: marquee
    width: 700
    height: 32
    color: "black"
    Text {
    font.pointSize: 9
    smooth: true
    text: "Go! HappyNewYear! Nice! Come on!"
    color: "white"

    NumberAnimation on x {
    from: marquee.width; to: -marquee.width;
    duration: 20000;
    loops: Animation.Infinite
    }
    }
    }
    @

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Are you running beta1 by any chance? Are you on Mesa, or proper OpenGL drivers?

      (Z(:^

      1 Reply Last reply
      0
      • W Offline
        W Offline
        weiyuemin
        wrote on last edited by
        #3

        I'm running Qt5(not beta, downloaded at Jan.4, from "this":http://releases.qt-project.org/qt5/5.0.0/qt-windows-opensource-5.0.0-msvc2010_32-x86-offline.exe)

        I'm using win xp. And I tried another two machines, one is win xp, another is win7, both produce the same result (text twinkles)

        I've update the newest display driver, but no use. I can normally play many new games.

        Don't you have the same result (text twinkles) ??

        And at the same time, when porting to Qt5, my text become ugly (than using Qt 4.8.3), with a same font.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Nope, works fine on Kubuntu, 64 bit. You probably don't have anti-aliasing turned on.

          (Z(:^

          1 Reply Last reply
          0
          • W Offline
            W Offline
            weiyuemin
            wrote on last edited by
            #5

            anti-aliasing!

            I guess this is what I need. How can I turn it on?

            Thank you!

            1 Reply Last reply
            0
            • W Offline
              W Offline
              weiyuemin
              wrote on last edited by
              #6

              Well, I've added antialiasing, but it seems no use:

              @
              import QtQuick 2.0

              Rectangle {
               id: marquee
               width: 700
               height: 32
               color: "black"
               antialiasing: true
               Text {    
                font.pointSize: 9
                smooth: true
                text: "Go! HappyNewYear! Nice! Come on!"
                color: "white"
                antialiasing: true
                   
                NumberAnimation on x {
                 from: marquee.width; to: -marquee.width;
                 duration: 20000;
                 loops: Animation.Infinite
                }
               }
              }
              

              @

              It still blinks

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                I think it has to be set up somewhere in QWindow, but I can't find the flag.

                (Z(:^

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  weiyuemin
                  wrote on last edited by
                  #8

                  renderType: Text.NativeRendering
                  solves the problem.
                  "this thread":http://qt-project.org/forums/viewthread/22158/ helps.

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    chrisadams
                    wrote on last edited by
                    #9

                    Sounds like there's a bug in the distance field vector calculation algorithm, on Windows. Please file a bug. This is related to your other post, too.

                    Cheers,
                    Chris.

                    1 Reply Last reply
                    0
                    • W Offline
                      W Offline
                      weiyuemin
                      wrote on last edited by
                      #10

                      I've posted a bug:
                      https://bugreports.qt-project.org/browse/QTBUG-29029

                      Thank you.

                      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