[Qt-interest] In need of help in qtwebkit, QNetworkAccessManager and QNetworkReply
Markus Goetz
Markus.Goetz at nokia.com
Tue Feb 23 15:51:32 CET 2010
ext Zaid Amir wrote:
>
>
>
> I have been trying for over a week now to try and load those images
> into memory and return them to my webview to be displayed. I have
> managed to override both QNetworkAccessManager and get the request
> from the currently loading page, parse the given url which is
> basically a special url (for example: “*/rc:image.jpg/*”), this would
> mean that image.jpg is currently residing in a resource file so I
> should search for it and return it to webview to be displayed.
>
>
>
> I am not sure how am I suppose to load the image data into memory and
> point my QNetworkReply object to it. I would appreciate any hint,
> example or idea to make this work.
>
>
>
Override QNetworkAccessManager::createRequest(..)
Make it handle rc: URLs special by returning a ZaidAmirNetworkReply object
In the ZaidAmirNetworkReply class override the readData(..) function to
return data from memory or wherever you have your custom image. Also
make sure to set appropriate Content-Type headers in this reply.
Hope that helps!
Markus
More information about the Qt-interest-old
mailing list