[Qt-interest] include modules vs. files
Arnold Krille
arnold at arnoldarts.de
Tue Feb 3 15:29:54 CET 2009
Hi,
On Tuesday 03 February 2009 00:07:06 Israel Brewster wrote:
> When looking at the help files for, say, QLineEdit, you see that it is
> in a specific module (QtGui), as well as the specific header for the
> module (QLineEdit). If you are only using a handful of object types in
> your application, is there an advantage to #including just the
> specific headers you need, rather than the entire module? Or would
> that just be wasted effort with no benefit? I would imagine that the
> executable size might be somewhat smaller, but I would like
> confirmation (or refutation) of this. Thanks!
Apart from the other answers (specific includes = less compile time and less
dependencies): I use the absolutely necessary includes in the normal
"production" files (so mostly its only QWidget or QObject that is included in
the header of my classes). And I use the generic includes only for the small
test-apps or during development of a new widget or a new concept (to not spend
to much time fixing missing includes when a lot of stuff is still changing).
Have fun,
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090203/931f86f1/attachment.bin
More information about the Qt-interest-old
mailing list