Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. need help with QNetworkAccessManager
Forum Updated to NodeBB v4.3 + New Features

need help with QNetworkAccessManager

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 622 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rickyharis39
    wrote on last edited by Rickyharis39
    #1

    hi i'm trouble with java script question in result QNetworkAccessManager

    the question is may i able to turn java script on with QNetworkAccessManager ?

    here the result link text

    QEventLoop              * eventLoop = new QEventLoop();
    QNetworkAccessManager   * mgr       = new QNetworkAccessManager();
    QNetworkRequest request = QNetworkRequest(QUrl(Url));
    
    QObject::connect(mgr, SIGNAL(finished(QNetworkReply*)), eventLoop, SLOT(quit()));
    request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
    request.setRawHeader( "User-Agent", this->UserAgentString );
    
    QNetworkReply * reply = mgr->get(request);
    eventLoop->exec();
    
    QMessageBox msgBox;
    msgBox.setText(reply->readAll());
    msgBox.exec();
    
    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      You probably want to use QtWebEngine rather than QNetworkAccessManager

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rickyharis39
        wrote on last edited by
        #3

        i'm done by adding cookie from my web browser

        request.setRawHeader( "Cookie", "__cfduid=d09917d23131b763dde1c7b17bc521a9a1499742347" ); // cookie

        but my new question how to auto generate __cfduid
        should i'm debug the website first ?

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved