Friday, October 10, 2014

Qt error: invalid use of incomplete type and forward declaration

You may get this error by one means or other, in my case I found it while trying to implement the dialogbox example in the book C ++ GUI Programming with Qt 4 by Jasmin Blanchette and Mark Summerfield.
I got nearly 51 errors after I ran it in my Qt Creator 5.3 IDE. The solution is just to replace the finddialog.cpp:

#include <QtGui>  

by

#include <QtWidgets>

clean , rebuild and run it again and have fun !!!

No comments:

Post a Comment