postEvent is a static method in the QApplication class; there is no reason to use an instance (qApp) here.