Yes, the inheritance is likely to be preferable. But from what class? Personally, I think that WContainerWidget in most cases is only an implementation detail. Therefore, the use of public inheritance to create a new widget if that widget "is not" actually container is mistakable from the point of design. So, I thought about public inheritance from WWidget and private inheritance from WContainerWidget. But now I found a method WCompositeWidget:: setImplementation(..), which allows to set that WContainerWidget is exactly an implementation detail of the composite widget.
Regards, Dmitriy Igrishin 2010/4/29 Dushan Savich <[email protected]> > I always use inheritance. > I guess it has something to do with the years of using the Qt and Delphi > :-) > > 2010/4/29 Dmitriy Igrishin <[email protected]> > >> Colleagues, >> >> As you know, there are two basic methods to create widgets using Wt. >> First, is to use inheritance from WContainerWidget to create >> self-contained widget. >> Second, is to write WWidget* my_function(..) and use it as argument of >> addWidget(..). >> I have interest on yours opinions about design decisions. When do you use >> inheritance >> and when do you use functions? >> >> Thanks! >> >> Regards, >> Dmitriy Igrishin >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> witty-interest mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/witty-interest >> >> > > > -- > Kind Regards, > Dushan Savich > [email protected] > http://stosha.com/ > +381 64 329 33 55 > Nehruova 95/51 > 11070 New Belgrade > Belgrade > Serbia > > > ------------------------------------------------------------------------------ > > _______________________________________________ > witty-interest mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/witty-interest > >
------------------------------------------------------------------------------
_______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
