[BUG299433] Problem while downloading image

Mehrdad Momeny mehrdad.momeny at gmail.com
Wed Mar 12 02:05:44 UTC 2014


Sorry for late answering.
Some backpain and bad situations here.

BTW,
I remember that we were using HTML way, to show images. adding images to
resources and giving address from resource in html tag <img>.
Why didn't you use that approach?

Regards,
Mehrdad


On Tue, Mar 11, 2014 at 3:51 AM, Daniel Kreuter
<daniel.kreuter85 at gmail.com>wrote:

> Hi,
>
> I found a way how to download images with standard Qt code using
> QNetworkAccessManager, QNetworkReply and QNetworkRequest. Images get
> downloaded but now I struggle with the postwidget adding the image to the
> UI (I use the QLabel and set the Image with setPixmap(pixmap)).
> How can I add the QLabel best to the UI without breaking the layout? I
> thought using a QVBoxLayout and adding first the textbrowser followed by
> the QLabel would do it's work, but this way no image is shown and the text
> in the textbrowser widget is totally broken.
>
> Any hints? If not I'm considering to move to QML first and add the bugfix
> afterwards because then the UI part is a lot easier to add new items to it.
> But this would take quite a lot of work to accomplish I think.
>
> Cheers
>
> Daniel
>
> > Am 05.03.2014 um 22:22 schrieb Daniel Kreuter <
> daniel.kreuter85 at gmail.com>:
> >
> > Hi,
> >
> > I'm using Choqok's MediaManager to download images from twitter, but
> without success.
> >
> > For downloading the image the MediaManager uses the following piece of
> code:
> >
> > KIO::Job *job = KIO::storedGet( srcUrl, KIO::NoReload,
> KIO::HideProgressInfo);
> >
> > srcUrl contains the correct image url (as KUrl). So far everything is
> fine.
> >
> > But once the signal result (KJob*) is called, I get only an html page
> from my internet provider with an dnserror and I don't know why.
> >
> > Calling the srcUrl in my Webbrowser works as expected, but through
> KIO::Job I don't get the image I request.
> >
> > Has anyone an idea if my code is wrong or something in kdelibs?
> > (The piece of code I'm talking about is in the project Choqok, file
> mediamanager.cpp lines 92 to 140)
> >
> > Cheers,
> >
> > Daniel
> _______________________________________________
> Choqok-devel mailing list
> Choqok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/choqok-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/choqok-devel/attachments/20140312/1d9e5d6a/attachment.html>


More information about the Choqok-devel mailing list