Hello Folks.

This is my first post as I am starting to learn Qt seriously =]

I am working on a nice app (https://bitbucket.org/arnaldodg/analise3d/overview), which takes info from wiimotes and shows on screen.
Actually I am creating my own dot tracker instead of using the wiimote itself to track IR dots.

My app is basically composed by 2 threads. A producer thread that polls the wiimotes and triggers the GUI thread to show dots (QGraphicItems) using QGraphicsScene/View.

There is a QMap<dot, dotItem> that holds my tracked dots. This map grows and shrinks as needed based on the number of dots detected.
The wiimote thread waits 5ms to retrigger and update the map.

When a new dot is detected I use:

dot = new QVector(...);
dotItem = scene->addRectItem(dx*x, dy*y, ...); //dx and dy are used to scale Wii coords to scene boundaries =]
map.Insert(dot, dotItem);

And when dot needs to be updated I use:

dotItem = map->value(dot);
dotItem->setPos(dx*x, dy*y);

The problem is that the QGraphicsItem is being positioned weirdly at random.
If I create another Item "by hand" or, let's say, outside this thread triggered function the Item is positioned correctly.

Could anyone help light things up here?!

Thanks in advance.

AD