[Porting to Qt5] Animation of Text unexpectedly twinkles
-
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.0Rectangle {
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
}
}
}
@ -
Are you running beta1 by any chance? Are you on Mesa, or proper OpenGL drivers?
-
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.
-
Nope, works fine on Kubuntu, 64 bit. You probably don't have anti-aliasing turned on.
-
anti-aliasing!
I guess this is what I need. How can I turn it on?
Thank you!
-
Well, I've added antialiasing, but it seems no use:
@
import QtQuick 2.0Rectangle { 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
-
I think it has to be set up somewhere in QWindow, but I can't find the flag.
-
renderType: Text.NativeRendering
solves the problem.
"this thread":http://qt-project.org/forums/viewthread/22158/ helps. -
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. -
I've posted a bug:
https://bugreports.qt-project.org/browse/QTBUG-29029Thank you.