[Qt-creator] Multiple Iheritance
André Pönitz
apoenitz at trolltech.com
Mon Jan 19 15:46:26 CET 2009
umut ozturk wrote:
> In most of the trolltech's example and other documents you suggested us to
> use multiple inheritance when working with the designer generated files.
There are several approaches to use designer generated files,
all coming with pros and cons, so there is no "generally
recommended" solution.
The Examples use multiple inheritance because that's an approach
that works well for small classes and also create the simplest
code of all.
> But, in qtcreator generated projects single inheritance is used.
> Could you explain me why
Using single inheritance with explicit creation/deletion allows
to use forward declaration to the Ui classes in the header files
and restrict the use of #include <ui_*.h> to the implementation
files. This way changes to the .ui will only trigger a re-build
of the class alone, not of everything that happens to #include
the class header.
As this approach scales better for larger projects it has been
chosen as the default pattern for projects created with Creator,
but using other patterns "manually" is fine and will work.
> (making it compatible with qt jambi?).
It is not related to Jambi.
Regards,
Andre'
More information about the Qt-creator-old
mailing list