Include QApplication where needed. Fixes #47