[Qgis-developer] drawing of points on canvas after a time period
Martin Dobias
wonder.sk at gmail.com
Mon May 15 09:48:00 EDT 2006
On 5/12/06, nitin quick <quick.nitin at gmail.com> wrote:
> hello everybody,
> 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 .
> void addPoint()
> {
> QPixmap bck=canvas.backGround();
> QPixmap *tpix=new QPixmap(canvas.width(),canvas.height());
> QPainter p;
> QRect r(0,0,canvas.width(),canvas.height());
> QPoint pt(0,0);
> p.begin(tpix);
> for (int i=0; i<10;i++)
> for(int j=0; j<10; j++)
> {
> p.fillRect(0,0,canvas.width(),canvas.height(),Qt::white);
> p.setPen(Qt::red);
> p.drawEllipse(a[i][j],a[i][j],3,3);
> bitblt(&bck,pt,tpix,r,Qt::AndROP);
> canvas.setBackGround(bck);
> sleep(1);
> }
> p.end;
> }
>
>
> 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) ;
Hi,
do you have still problem with this? Probably Qt-interest is a better
list to seek help on this topic...
Bye,
Martin
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>
>
>
More information about the Qgis-developer
mailing list