[Qt-interest] QGraphicsItem movement problem
Riccardo Roasio
riccardo.roasio at gmail.com
Thu Jul 15 15:00:57 CEST 2010
Hi,
i'm implementing a movement of a QGraphicsItem due to mouse press and movement..
currentMovement=event->pos().x();
if(currentMovement<startMovement)
{
//movememnt is right to left
int delta=startMovement-currentMovement;
currentX=startX-delta;
std::cout<<"DELTA : "<<delta<<std::endl;
std::cout<<"currentX : "<<currentX<<std::endl;
setPos(currentX,startY);
update();
}
the problem is that the effect is not so fluid, but the continuous
refresh create a blinking effect of the item..
I can i solve this problem?
Thanks,
Riccardo
More information about the Qt-interest-old
mailing list