[Solved] QPropertyAnimation not working on maemo5 ?

  • I got an application that uses QPropertyAnimation to animate a QGraphicsItem, but it does not work as expected. In the simulator and in a windows desktop build it works as expected, the graphicsitem moves from point1 to point2. But on maemo5 the QGraphicsItem get set to x=0 y=0 and it does not move.

    List of installed Qt packages on maemo5:
    libqt4-appdownloader-comm 0.3.5
    libqt4-core 4.7.0
    libqt4-dbus 4.7.0
    libqt4-declarative 4.7.0
    libqt4-gui 4.7.0
    libqt4-maemo5 4.7.0
    libqt4-multimedia 4.7.0
    libqt4-network 4.7.0
    libqt4-opengl 4.7.0
    libqt4-phonon 4.7.0
    libqt4-script 4.7.0
    libqt4-sql 4.7.0
    libqt4-sql-sqlite 4.7.0
    libqt4-svg 4.7.0
    libqt4-test 4.7.0
    libqt4-translations 4.7.0
    libqt4-webkit 4.7.0
    libqt4-xml 4.7.0
    libqt4-xmlpatterns 4.7.0

    In Qt creator i got this:
    Qt for Fremantle PR1.3 Devices (Nokia Qt SDK)
    Qt version 4.7.0, using mkspec default (maemo)

  • I suggest that you should post a small piece of code here for people to help you or just go straight to JIRA and report a bug. On either case you will need a small piece of code that shows problem.

  • Hum.. after doing some debuging I think that QPropertyAnimation may not be the fault... I will report back when I know more.

  • It was a problem with QString to float conversion in my code, I had to do this:

    //t1 and t2 is QStringList's
    #ifdef Q_WS_WIN
    targetpoint1 = new QPoint((t1[0].toFloat()*32),(t1[1].toFloat()*32));
    targetpoint2 = new QPoint((t2[0].toFloat()*32),(t2[1].toFloat()*32));

    #ifndef Q_WS_WIN
    targetpoint1 = new QPoint((t1[0].replace(",",".").toFloat()*32),(t1[1].replace(",",".").toFloat()*32));
    targetpoint2 = new QPoint((t2[0].replace(",",".").toFloat()*32),(t2[1].replace(",",".").toFloat()*32));

    I don't know if there is a better solution to this..

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.