Just wondering:
Is there any advantage of doing #include <QHttp>, etc.
instead of doing #include <QtNetwork>?
Does it load less code into memory or what?
Printable View
Just wondering:
Is there any advantage of doing #include <QHttp>, etc.
instead of doing #include <QtNetwork>?
Does it load less code into memory or what?
Including a header of a single class makes the compilation faster than including all the headers of the whole module. Headers QtCore, QtGui, QtNetwork, etc. are convenience headers that include all headers belonging to the corresponding module.
I have another question regarding modules?
What is the difference between (for instance):
Code:
#include <QtGui/QAction>
and
Code:
#include <QAction>
Which is right? It seems both includes work fine ...
Usingassumes your include paths point to the .../include/QtGui/ directory, whereasCode:
#include <QAction>
requires only that your include path contain the main Qt .../include/ directory.Code:
#include <QtGui/QAction>