To answer the second question: see QCoreApplication::postEvent(…) (http://qt-project.org/doc/qt-5/qcoreapplication.html#postEvent).
To answer the second question: see QCoreApplicatio n::postEvent( …) (http:// qt-project. org/doc/ qt-5/qcoreappli cation. html#postEvent).