Thanks. As it turned out I was able to solve it eventually. Now - I dont
understand this message:

C:\Projects\qtada\calc>gprbuild -p -Pgpr\calc_moc.gpr
creating auto.cgpr
amoc engine_widgets.ads


raised CONSTRAINT_ERROR : amoc-generator.adb:676 range check failed
gprbuild: *** compilation phase failed

----------------------
I think the offending code is my slot :

   procedure Add_Digit( Self : not null access Engine_Widget'Class ;
                        Digit : Character ) ;
   pragma Q_Slot(Add_Digit,"addDigit(char)") ;

--------------------

I suspect only certain types are allowed as parameters to slots?

thanks for pointers. srini

On Mon, Jul 27, 2009 at 3:43 PM, Vadim Godunko <[email protected]> wrote:

> Rajagopalan Srinivasan wrote:
> > i am doing my first qtada program and am looking for some help. Listed
> here
> > is the spec and body of a new widget i am trying to create.
> >
> > clearly something is missing since this widget does not update the
> window.
> > (Just a blank where it is supposed to be).
> >
> > following is the spec of a new widget :any clues appreciated.
> >
> You create QLcdNumber instance but don't "connect" it to your widget. At
> least you should pass value for Parent:
>
>   Self.Display :=
>     Qt4.LCD_Numbers.Constructors.Create
>       (Num_Digits => 12, Parent => Self);
>
> or even better to use layout engine like:
>
> function Create (Parent : access Qt4.Widgets.Q_Widget'Class := null)
>  return not null Engine_Widget_Access
> is
>   Self   : constant Engine_Widget_Access := new Engine_Widget;
>    Layout : constant not null Qt4.V_Box_Layouts.Q_V_Box_Layout_Access
>     := Qt4.V_Box_Layouts.Constructors.Create;
>
> begin
>   Qt4.Widgets.Directors.Constructors.Initialize (Self, Parent);
>
>   Self.Display :=
>     Qt4.LCD_Numbers.Constructors.Create (Num_Digits => 12);
>   Self.Display.Set_Segment_Style (Qt4.LCD_Numbers.Flat);
>
>    Layout.Add_Widget (Self.Display);
>   Self.Set_Layout (Layout);
>
>   return Self;
> end Create;
>
> PS. Note, you need not redefine Paint_Event unless you need to do
> special processing of paint events.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.qtada.com/pipermail/qtada-users_lists.qtada.com/attachments/20090727/ae96d011/attachment.html>
_______________________________________________
qtada-users mailing list
[email protected]
http://lists.qtada.com/mailman/listinfo/qtada-users_lists.qtada.com

Reply via email to