[Qgis-developer] OS X QtWebKit problem fixed, PyQwt still broken

Larry Shaffer larrys at dakotacarto.com
Mon Feb 27 12:14:00 EST 2012


Hi William,

On Sun, Feb 26, 2012 at 9:42 PM, William Kyngesburye
<woklist at kyngchaos.com> wrote:
> New package online for OS X QGIS 1.7.4.  I compiled Qt 4.8 from source and the QtWebKit bug is gone.

I can confirm QtWebKit is working fine with your 1.7.4-2 build, both
on 10.7.3 and 10.6.8, on all my Macs, regardless of installed (or no)
system Qt SDK version. Thank you for getting this to work.

The problem I had while testing the QtWebKit function of some QGIS
plugins was how the loading of a local file URL was coded.

This worked under Qt 4.7.4, but fails with a blank page, due to lack
of a protocol, on 4.8.0:

self.helpviewer.setUrl(QUrl(
    os.path.join(plugin_dir, "html", "help.html")))

It needs to have the file:// protocol expressly added:

self.helpviewer.setUrl(QUrl(
    "file://%s"
    % (os.path.join(plugin_dir, "html", "help.html"))))

This error is present in some currently distributed QGIS plugins. The
resultant blank web pages made me think your builds weren't working. I
could find no documentation of this change at Qt's site.


I'd like to compile nightly builds of QGIS under Snow Leopard, was
there anything you edited or changed when compiling Qt 4.8.0 to get
WebKit to work?


Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota


More information about the Qgis-developer mailing list