I have a painter window which has the following procedure :

     overriding
     procedure Mouse_Move_Event
     (Self  : not null access Scribble_Window;
      Event : not null access Qt4.Mouse_Events.Q_Mouse_Event'Class)is
     use Qt4 ;
     begin
        if Self.Pendown
        then
           Put_Line("scribble");
           declare
              Painter : aliased Qt4.Painters.Q_Painter
                := Qt4.Painters.Create(Self) ;
              Pt : Qt4.Points.Q_Point := Event.Pos ;
           begin
              Painter.Set_Pen
                (Qt4.Pens.Create (Qt4.Colors.Create (Qt4.Black)));
              Painter.Draw_Line( Self.Lastpoint , Pt ) ;
              Self.Lastpoint := Pt ;
              Self.Update ;
           end ;
        end if ;
     end Mouse_Move_Event ;

however I am getting the runtime error -

QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setPen: Painter not active
scribble
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setPen: Painter not active

not too clear what is going on. any ideas?

thanks, srini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.qtada.com/pipermail/qtada-users_lists.qtada.com/attachments/20090807/b2c7d482/attachment.html>
_______________________________________________
qtada-users mailing list
[email protected]
http://lists.qtada.com/mailman/listinfo/qtada-users_lists.qtada.com

Reply via email to