Important: Please read the Qt Code of Conduct -

QNetworkAccessManager::get takes over 1 second

  • Hello,

    I have written this small piece of code:

        QNetworkAccessManager * m_netwManager = new QNetworkAccessManager(this);
        connect(m_netwManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(slot_netwManagerFinished(QNetworkReply*)));
        qDebug() << "create";
        QNetworkRequest request(url);
        qDebug() << "get";
        //why does this take ~1second?????????
        QNetworkReply * rep = m_netwManager->get(request);
        qDebug() << "rr f";

    It works perfectly. Until now i used QT 5.5.0 and i had no problems doing it in the UI main thread. Now i updated to QT 5.5.1 and the line QNetworkReply * rep = m_netwManager->get(request); blocks for about 1 second. I googled that it is caused by Windows. (see Is there any workaround or do i have to thread my application?

    BTW i'm using a static QT version with MinGW64 and OpenSSL linked in on WIN10

Log in to reply