Discussion:
[Wt-interest] Is there a difference between "aContainerWidget->addWidget (new WWidget); " and "new WWidget (aContainerWidget); "
K. Frank
2015-07-12 00:52:37 UTC
Permalink
Hello List!

More concretely, is there any difference between, for example

root()->addWidget (new WText ("Some text"));

and

new WText ("Some text", root());

In my very simple tests they appear to be the same.

If the answer is that they are functionally equivalent, are they also,
in fact, exactly synonymous?

(I am new to Wt, but have some simple experience with Qt. So let
me also ask: How closely does Wt's "parent-child" model match
that of Qt? For example, in Wt how does one establish and break a
parent-child relationship, who has ownership, who has responsibility
for deleting child object, and so on?)


Thanks.


K. Frank

Loading...