[PyQt] QWebView doesn't run inline javascript

Kovid Goyal kovid at kovidgoyal.net
Sat Feb 15 11:55:43 GMT 2014


You need to supply the baseurl, webkit cannot know how to resolve
relative links in the document without that.

	setHtml ( const QString & html, const QUrl & baseUrl = QUrl() )

Kovid.

On Sat, Feb 15, 2014 at 01:59:00PM +0400, Dmitry Shachnev wrote:
> I believe this is the same problem I reported earlier:
> 
> https://bugreports.qt-project.org/browse/QTBUG-26883
> 
> And it is not specific to PyQt.
> 
> --
> Dmitry Shachnev
> 
> On 2/15/14, Starglider Developer <starglider.dev at gmail.com> wrote:
> >  I have a html/javascript in a var, if á set
> > QWebView.setHTML(myhtml_javascript_var) it doesn't show nothing but if I
> > use QWebView.load(files_name) it works!
> >
> > Where is the problem? because the file as the same contents as the
> > variable.
> >
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> !DSPAM:3,52ff3a79281101864811212!
> 
> 

-- 
_____________________________________

Dr. Kovid Goyal 
http://www.kovidgoyal.net
http://calibre-ebook.com
_____________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140215/7ba099fb/attachment.pgp>


More information about the PyQt mailing list