[Qt-interest] QWebView HelloWorld - image doesn't load
Eric Clark
eclark at ara.com
Mon Dec 21 19:35:54 CET 2009
I have ran into images not loading before and the problem was that I was missing the Qt image dlls. The dlls need to be located in your application's executable directory under the sub directory imageformats, like so:
MyApplicationDirectory/imageformats/qgif4.dll
This is just one of the image dlls, there is one for each type of image (i.e. GIF, JPEG, PNG, etc.). If these dlls are not there, Qt does not know how to load the images and you get exactly what you are seeing.
Hope this helps!
Eric
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Constantin Makshin
> Sent: Saturday, December 19, 2009 12:45 PM
> To: Qt Interest
> Subject: Re: [Qt-interest] QWebView HelloWorld - image doesn't load
>
> Yes, it's a GIF image
> (http://www.google.com/intl/en_ALL/images/logo.gif).
>
> On Sat, 19 Dec 2009 21:16:04 +0300, Stephen Jackson
> <spjackson42 at gmail.com> wrote:
> > 2009/12/17 Hawkeye Parker :
> >>
> >> QWebView* webView = new QWebView();
> >>
> >> webView->load(QUrl("http://www.google.com/"));
> >>
> >> webView->show();
> >>
> >> Here’s what I get:
> >>
> >> http://www.hadal.org/misc/pics/googleNoImage.jpg
> >>
> >> I’ve tried mucking with the various QWebSettings with no luck.
> >> QDesktopServices::openUrl() is giving me a different problem, so I’d
> >> rather
> >> use Qt’s browser if I can….
> >>
> >
> > Here are some suggestions for things to check.
> >
> > Does the demo in qt/demos/browser work? It does for me (Qt 4.5.3 on
> > Linux) and the image is displayed.
> >
> > I think that image is a GIF. Do you have GIF support in your Qt
> build?
> > Do images other than GIF get loaded correctly?
>
> --
> Constantin Makshin
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list