I will also add:

5. Make sure you implemented the constructor you had declared in the class header.

By the way, having a main window constructor that takes a QMainWindow as its parent is probably an error in design.