yagabey
3rd September 2014, 13:24
Hi,
I want to change the speed of a svg animation on QGraphicsScene.
For testing, Ive added the following function to "SvgViewer app (http://qt-project.org/doc/qt-5/qtsvg-svgviewer-example.html)" in example applications of QtCreator :
void SvgView::mousePressEvent(QMouseEvent *event)
{
qDebug()<<((QGraphicsSvgItem*)m_svgItem)->renderer()->framesPerSecond();
((QGraphicsSvgItem*)m_svgItem)->renderer()->setFramesPerSecond(0);
}
Although the animation should stop after calling this; there is no change in the animation speed.
What may be the problem here?
Thanks in advance...
I want to change the speed of a svg animation on QGraphicsScene.
For testing, Ive added the following function to "SvgViewer app (http://qt-project.org/doc/qt-5/qtsvg-svgviewer-example.html)" in example applications of QtCreator :
void SvgView::mousePressEvent(QMouseEvent *event)
{
qDebug()<<((QGraphicsSvgItem*)m_svgItem)->renderer()->framesPerSecond();
((QGraphicsSvgItem*)m_svgItem)->renderer()->setFramesPerSecond(0);
}
Although the animation should stop after calling this; there is no change in the animation speed.
What may be the problem here?
Thanks in advance...