Results 1 to 2 of 2

Thread: problem with assigning the downloadloded image to label

  1. #1
    Join Date
    May 2009
    Posts
    129

    Default problem with assigning the downloadloded image to label

    hi

    i downloaded theimage from one Url ...while assigning the image to label ,at that time application is crashing ...here i have attached the code...

    Note: i ma sending the Url string to image download from Widget.cpp..


    Thanks


    Addu T.R
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2008
    Location
    TaganrogNativelandChehov,Russia
    Posts
    64
    Thanks
    1
    Thanked 8 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with assigning the downloadloded image to label

    first of all, why do you connect signal(void sendimage(QImage)) and slot(void getimage(const QImage &image)) which have different parametrs QImage!=const QImage&.

    Can you make test?
    Qt Code:
    1. void Tweet::getimage(const QImage &image)
    2. {
    3. if(image.isNull()) return;
    4. QPixmap pix(QPixmap::fromImage(image));
    5. if(pix.isNull()) {
    6. qDebug()<<"bad image";
    7. return;
    8. }
    9. m_ui->userImage->setPixmap();
    10. QMessageBox::information(0,"",QString("image got from download"));
    11. }
    To copy to clipboard, switch view to plain text mode 

    second.
    Qt Code:
    1. image = new QImage();
    To copy to clipboard, switch view to plain text mode 
    where are you return memory back?

Similar Threads

  1. QStackedWidget fill Postscript image And scroll problem
    By patrik08 in forum Qt Programming
    Replies: 11
    Last Post: 22nd April 2007, 09:30
  2. Problem getting an image from a web server
    By probine in forum Qt Programming
    Replies: 3
    Last Post: 12th January 2007, 23:05
  3. Transfer image problem
    By probine in forum Qt Programming
    Replies: 7
    Last Post: 4th May 2006, 10:24
  4. problem with the back ground image
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 17th April 2006, 21:34
  5. problem with image colections
    By zlatko in forum Qt Programming
    Replies: 1
    Last Post: 6th February 2006, 13:43

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.