Results 1 to 5 of 5

Thread: How to parse the image from the server and display it in the Listwidget?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to parse the image from the server and display it in the Listwidget?

    Not unless you tell us what you are starting with. The few lines you have posted are not sufficient for us to know what you actually have as input.

  2. #2
    Join Date
    Nov 2011
    Posts
    45
    Qt products
    Qt4
    Platforms
    Symbian S60

    Post Re: How to parse the image from the server and display it in the Listwidget?

    void screen::content(QList<QString> name,QList<QString> category,QList<QString> image)
    {
    QListWidget *list = new QListWidget(0);
    list->setIconSize(QSize(70,70));

    QStringList strList;
    for(int i=0 ; i<name.count(); i++)
    {
    QString Name = name[i];
    QString Image = image[i];



    QNetworkAccessManager *nam = new QNetworkAccessManager(this);
    connect(nam, SIGNAL(finished(QNetworkReply*)),this, SLOT(finished(QNetworkReply*)));
    QByteArray myData("image");
    nam->post(QNetworkRequest(QUrl("image")),myData);



    QString f = Name ;

    ui->listWidget->addItem(new QListWidgetItem(QIcon("reply"),f,ui->listWidget));


    }
    this->showFullScreen();
    }

    voidscreen::replyFinished(QNetworkReply *reply)
    {
    reply->readAll();
    }


    This is my code in which i am trying to parse the image from the server.I dont know how to parse the image into the listwidget i had tried this level.Help me out to get the answer?

    Regards,
    Harish.M
    Last edited by harish; 7th December 2011 at 09:43. Reason: spelling corrections

Similar Threads

  1. Replies: 1
    Last Post: 24th August 2011, 14:09
  2. Parse RSS into html and display it in QWebView.
    By halvors in forum Qt Programming
    Replies: 11
    Last Post: 14th August 2010, 12:44
  3. how to parse xml with a image using qt?
    By bezlew in forum Qt Programming
    Replies: 1
    Last Post: 3rd November 2009, 09:04
  4. systray: icon does not display in windows server 2003
    By lovelypp in forum Qt Programming
    Replies: 0
    Last Post: 23rd September 2008, 10:47
  5. Display a QWidget on two X-Server at the same time
    By tarod in forum Qt Programming
    Replies: 0
    Last Post: 1st July 2008, 12:55

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
  •  
Qt is a trademark of The Qt Company.