#include <QtGui> doesn't work
By running the example of FindDialog of C++ GUI Programming with Qt4, I found it wouldn't compile if only include <QtGui>. I have to #include individual widgets. I am using latest Qt (version 5.0.2). Qt cannot backward compatible with older version?
In Qt 5, widgets have been moved in the QtWidget module.
Qt 5 has many major changes compared to Qt 4. The code is mostly backwards compatible, but you need to change your configurations and headers.
Add this line to the .pro file...
QT += widgets
...and use #include <QtWidgets> instead of #include <QtGui>