Jean Francois Martinez wrote:
> For instance I would like to understand a bit about when to use
> qt4.widgets.impl.constructors.initialize and when not (I also
> have a problem with it since it seems to crash when the structure 
> being initialized is not a direct sibling from qt4.widgets but 
> say, one from qt4.main_window)
> 
When you create your Ada subclass from Qt class, you need to declare Ada 
tagged type derived from Qt4.<class>.Impl.<class>_Impl type and call 
Qt4.<class>.Impl.Constructors.Initialize for internal structures 
initialization.

So, for the type derived from QWidget type declaration looks like:

type My_Widget_Impl is new Qt4.Widgets.Impl.Q_Widget_Impl with private;

and you must call Qt4.Widgets.Impl.Constructors.Initialize at the 
beginning of the My_Widget_Impl object initialization.

For the type derived from QMainWindow type declaration looks like:

type My_Main_Window_Impl is
   new Qt4.Main_Windows.Impl.Q_Main_Windows_Impl with private;

and you must call Qt4.Main_Windows.Impl.Constructors.Initialize at the 
beginning of the My_Main_Windows_Impl object initialization.

> Also, why and when do we need to use
> my_widget.set_dynamically_allocated.
> 
This is a part of deprecated functionality, it will be removed in some 
future versions of the QtAda. For now you must always call it somewhere 
in the constructor subprogram.

> Another problem is that, it looks like now we have to use a MOC package,
> even when there
> no signals (unlike like in qtada  1.0), again I would like to have even
> a few lines of doc about it.
> 
MOC child package contains information for the integration with the Qt 
Meta System. In the QtAda 2.0 this package must be generated for the all 
users types directly or indirectly derived from the QObject. User also 
needs to "with" this package somewhere in the code.


_______________________________________________
qtada-users mailing list
[email protected]
http://lists.qtada.com/mailman/listinfo/qtada-users_lists.qtada.com

Reply via email to