This error message is telling you that there is a problem with the variable painter
. Specifically, it has an initializer (the argument this
), but its type is incomplete.
The most likely cause of this error is that you have not included the necessary header file(s) for QPainter
. Make sure that you have included the appropriate headers and that they are properly formatted.
Additionally, make sure that you have correctly declared your class and all its members before using them in this file.