hello everybody,<br>here is a piece o code i am presenting for help. It is supposed to put points on canvas after a interval. Co-ordinate point are store in a 2d matrix a[][].canvas is object refrence to QCanvas class .<br>
void addPoint()<br>{<br> QPixmap bck=canvas.backGround();<br> QPixmap *tpix=new QPixmap(canvas.width(),canvas.height());<br> QPainter p;<br> QRect r(0,0,canvas.width(),canvas.height());<br> QPoint pt(0,0);<br> p.begin(tpix);
<br>for (int i=0; i<10;i++)<br>for(int j=0; j<10; j++)<br>{<br> p.fillRect(0,0,canvas.width(),canvas.height(),Qt::white);<br> p.setPen(Qt::red);<br> p.drawEllipse(a[i][j],a[i][j],3,3);<br> bitblt(&bck,pt,tpix,r,Qt::AndROP);
<br> canvas.setBackGround(bck); <br> sleep(1);<br>}<br>p.end;<br>}<br><br><br>but this code is printing line in one go only after waiting for some time. What iwant is i can view plotting of each point aftera interval( here i put 1 in sleep) ;
<br>