Fix: send application quit event when qml engine is closed.