Check if you have mymainform.cpp mentioned in SOURCES section of your project file. Add it if it's not there and rerun qmake afterwards.