Took out #include "stacktabwidget.h" and it works again. But my original question remains.