December 10, 2010

sleam sleam
Lab Rat
30 posts

[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)

3 replies

December 10, 2010

fcrochik fcrochik
Lab Rat
447 posts

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.

 Signature 

Certified Specialist & Qt Ambassador Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop… Qt everywhere!

December 10, 2010

sleam sleam
Lab Rat
30 posts

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

December 10, 2010

sleam sleam
Lab Rat
30 posts

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

  1. //t1 and t2 is QStringList's
  2. #ifdef Q_WS_WIN
  3.         targetpoint1 = new QPoint((t1[0].toFloat()*32),(t1[1].toFloat()*32));
  4.         targetpoint2 = new QPoint((t2[0].toFloat()*32),(t2[1].toFloat()*32));
  5. #endif
  6.  
  7. #ifndef Q_WS_WIN
  8.         targetpoint1 = new QPoint((t1[0].replace(",",".").toFloat()*32),(t1[1].replace(",",".").toFloat()*32));
  9.         targetpoint2 = new QPoint((t2[0].replace(",",".").toFloat()*32),(t2[1].replace(",",".").toFloat()*32));
  10. #endif

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

 
  ‹‹ Qt on Android 2.3 seems promising      OOM Data Manager and Mem Monitor Migration Path ››

You must log in to post a reply. Not a member yet? Register here!