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 !!!

Thursday, October 9, 2014

Qt Creator view menu : enable or disable

Crafting a UI in Qt is cool but sometimes it appears that the design tool sets just vanish. On Windows --> Views , view is disabled and here comes the trouble. You just have to go to the Mode Selector on left hand side and click on Debug or Design Mode for View to become active. When you are on Edit Mode, the view becomes inactive. Hopefully that you have got the idea...