Hello
Is using the code below
There are certain differences with the following code????:
Qt Code:
#include <QWidget> #include <QLabel> #include <QTextEdit> #include <QMenu> ....... .......To copy to clipboard, switch view to plain text mode
thanks.
Hello
Is using the code below
There are certain differences with the following code????:
Qt Code:
#include <QWidget> #include <QLabel> #include <QTextEdit> #include <QMenu> ....... .......To copy to clipboard, switch view to plain text mode
thanks.
The first one is a module include, it indirectly includes all headers of the respective module, in this case QtWidgets.
The second option is including each type individually.
I wouldn't recommend using the frist one outside of small test programs or prototyping.
Including all headers means that the compiler will have to parse a lot of declarations that it then doesn't need, i.e. a waste of build time.
Cheers,
_
8Observer8 (18th August 2014), rezas1000 (18th August 2014)
Bookmarks