×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    47

    image download using http connection in qt

    hello all,

    i am using Symbian S60 5th edition and qt to develop my application.

    can any one help me how do i download an image using http connection from my web server.i need an example.so please help me.
    Last edited by shaktiqt123; 2010-02-25 at 13:11.

  2. #2
    Registered User
    Join Date
    Dec 2009
    Posts
    39

    Re: image download using http connection in qt

    Hi shaktiqt123,

    The good news is that writing a http GET command is very easy in Qt.

    The code in the documentation is pretty much all that you need: QNetworkAccessManager

    So, something like this should do it:

    Code:
    void myClass::sendGetRequest()
    {
        QNetworkAccessManager *manager = new QNetworkAccessManager(this);
        connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
        manager->get(QNetworkRequest(QUrl("http://www.yourserver.com/picture.jpg")));
    }
    
    void myClass::replyFinished(QNetworkReply* aReply)
    {
        // Do something with reply
    }
    Note: I wrote that off-hand so it probably won't compile.

  3. #3

Similar Threads

  1. Download image with emulator s60
    By jen_fu168 in forum Mobile Java Tools & SDKs
    Replies: 7
    Last Post: 2006-09-10, 17:29
  2. Close HTTp Connection in N6230i
    By cars2004 in forum Mobile Java General
    Replies: 1
    Last Post: 2005-06-24, 10:46
  3. Close HTTp Connection in N6230i
    By cars2004 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-06-24, 09:29
  4. 6620 Http Connection
    By smalldevice in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-06-09, 14:35
  5. Image download problem using HTTP on 3650
    By rinosh in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2003-11-10, 14:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •