[Qt-interest] include modules vs. files
Malyushytsky, Alex
alex at wai.com
Tue Feb 3 00:52:47 CET 2009
Such comprehensive includes as QtGui usually are provided for convenience.
I might consider to use it only, if include section does not fit a page in the editor, because I had to include a large number of the headers which are available at QtGui header. In this case including QtGui would improve readability of the code.
Including specific header is more informative than QtGui, and requires less compilation time unless you need all the includes anyway.
Best regards,
Alex Malyushytsky
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Israel Brewster
Sent: Monday, February 02, 2009 3:07 PM
To: Qt Interest
Subject: [Qt-interest] include modules vs. files
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!
-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
More information about the Qt-interest-old
mailing list