Because I put tarwidget.cpp in the view folder, open the .Pro file:
SOURCES += TarWidget.cpp\
View/TarWidgdet.cpp\
There are two. Delete the upper one.
SOURCES += View/TarWidgdet.cpp\
It also needs to be deleted under headers.
Finally, just execute qmake.