When you try and compile some code and you get an error along the lines of invalid use of an incomplete type ‘whatever type’ then in most cases it means you need to include the header file where that type is displayed.
For example I had the following events in my header file:
protected: void mousePressEvent(QGraphicsSceneMouseEvent *event); void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
When when I tried to compile gave the following error:
invalid use of incomplete type ‘struct QGraphicsSceneMouseEvent’
This was because the compiler could not find details of the struct and hence the details. To fix the problem I need to include the header.
This of course is similar to the initialized but not complete error but subtly different.