[BUG299433] Problem while downloading image

Daniel Kreuter daniel.kreuter85 at gmail.com
Tue Mar 11 21:24:50 UTC 2014


Hi,

I got it working now. The only thing left is the size of the images which doesn't work, yet.

But this has to wait, since I'm currently not able to fetch any tweets and I don't know why (without any warning I got SSL errors from Twitter).

Cheers

Daniel

> Am 10.03.2014 um 20:51 schrieb Daniel Kreuter <daniel.kreuter85 at gmail.com>:
> 
> 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


More information about the Choqok-devel mailing list