While programming in C++ with Qt what includes should I make? Just 2 includes
#include
#include
or
Include only the definitions of the classes you need - anything else isn't just lazy, it's extremely wasteful and to my mind bad style.
Including QtGui (which itself includes QtCore) will lead to adding about 350(!) header files to your compilation, when in your example you only needed 6. Compiling will take longer, and when someone tries to maintain your app and is browsing your files they won't be able to infer from just the includes what exactly it is each file/class is trying to do - they'll have to read the entire source to get an idea.