Results 1 to 9 of 9

Thread: QNetworkAccessManager problem. It send's nothing

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2011
    Posts
    15
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy QNetworkAccessManager problem. It send's nothing

    Hello!!! I have a trouble with QNetworkAccessManager.
    I created new Qt project and use Sample code. It works perfect. But when i try to past my code into existing project. "manager->get(request)" send nothing and finished slot's dosn't fire. I use QT4.6 and Visual Studio 2008. May be i forget to include some directive or debugger option? Another not network slot's work's perfect. All network slots(slotError,slotReadyRead) dosn't fire. Checkpoint.php add's visit record to text file. May be QNetworkAccessManager conflict with existing project?

    I will be very happy if someone could help.

    Qt Code:
    1. const QString url= "http://127.0.0.6/checkpoint.php";
    2. QNetworkRequest request;
    3. request.setUrl(QUrl(url));
    4. request.setRawHeader("User-Agent", "MyOwnBrowser 1.0");
    5. qDebug("running");
    6.  
    7. manager = new QNetworkAccessManager(this);
    8. QNetworkReply *reply = manager->get(request);
    9.  
    10. QObject::connect(reply, SIGNAL(readyRead()), this, SLOT(slotReadyRead()));
    11. QObject::connect(manager, SIGNAL(finished(QNetworkReply*)),this, SLOT(replyHasFinished()));
    12. QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)),this, SLOT(slotError(QNetworkReply::NetworkError)));
    13.  
    14. QObject::connect(reply, SIGNAL(sslErrors(QList<QSslError>)),this, SLOT(slotSslErrors(QList<QSslError>)));
    15.  
    16. ....
    17. void MyClass::replyHasFinished(){
    18. AfxMessageBox(_T("replyHasFinished WORKS"));
    19. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by stepchik; 1st April 2011 at 10:46.

Similar Threads

  1. Replies: 6
    Last Post: 7th November 2012, 05:13
  2. QNetworkAccessManager problem instantiating
    By hojoff79 in forum Qt Programming
    Replies: 8
    Last Post: 9th February 2011, 04:59
  3. send mail from qt app problem
    By cutie.monkey in forum Qt Programming
    Replies: 12
    Last Post: 30th September 2010, 19:31
  4. qnetworkaccessmanager problem!
    By novamaster in forum Qt Programming
    Replies: 6
    Last Post: 7th August 2010, 11:46
  5. Replies: 0
    Last Post: 30th August 2009, 15:18

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.