I don't know where to create the QApplication to not be blocked by the .exec()