I am building a library with Qt that calls a server and I need to build a synchronous function that waits for an HTTP response (QNetworkReply object) and I am using a QEvent