fixed the "QCoreApplication::postEvent: Unexpected null receiver" bug