[Interest] QFileInfoList inheritance producing warnings
Guido Seifert
wargand at gmx.de
Fri Apr 4 22:58:02 CEST 2014
> Well, you _can_, as long as you only add methods and no members. Qt does it too, with QQueue and QStack for instance.
> It can be convenient to add some nice API.
You can, but you should not. Convenient can also be interpreted as lazy. ;-)
I would use a composition approach. Deemed to be more flexible. Why
inheritance was used in QQueue and QStack? Simpler code? Better readability?
Performance reasons? No idea. If someone can give a reason, it is probably
Thiago. :-D
Guido
More information about the Interest
mailing list