QWidget: Must construct a QApplication before a QWidget

First hit on Google explains it: