Use QApplication.instance() instead of qApp because qApp seems to ignore the attribut...