<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Qt 4.8.4 QtWebkit doesn&#x27;t load Javascript]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I'm using qtwebkit to load webpage inside my app. The HTML is loaded well but the Javascript is never loaded.</p>
<p dir="auto">Do you know what could be happen ?</p>
<p dir="auto">Thanks a lot.</p>
]]></description><link>https://forum.qt.io/topic/32325/qt-4-8-4-qtwebkit-doesn-t-load-javascript</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 May 2026 16:05:37 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/32325.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 24 Sep 2013 08:25:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Qt 4.8.4 QtWebkit doesn&#x27;t load Javascript on Tue, 24 Sep 2013 15:13:51 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<pre><code>  I have tried to execute this function:
</code></pre>
<p dir="auto">QVariant name = ui-&gt;myBrowser-&gt;page()-&gt;mainFrame()-&gt;evaluateJavaScript("function abc(){alert('This page has finished loading!');return 'he'} abc();");</p>
<p dir="auto">qDebug() &lt;&lt; "NAME: " &lt;&lt; name.toString();</p>
<p dir="auto">The result of NAME can be garbage of the buffer?</p>
<pre><code>  NAME:  "-1.45215999014136e-58"       NAME:  "-1.45215999014147e-58"       NAME:  "-1.45215999014158e-58"       NAME:  "-1.45215999014169e-58"       NAME:  "-1.45215999014179e-58"       NAME:  "-1.4521599901419e-58"       NAME:  "-1.45215999014201e-58"       NAME:  "-1.45215999014212e-58"       NAME:  "-1.45215999014222e-58"       NAME:  "-1.45215999014233e-58"       NAME:  "-1.45215999014244e-58"       NAME:  "-1.45215999014255e-58"       NAME:  "-1.45215999014265e-58" 
</code></pre>
<p dir="auto">I am using QT 4.8.4 version, and with older versions I had not problems.</p>
<p dir="auto">Thanks.</p>
]]></description><link>https://forum.qt.io/post/196540</link><guid isPermaLink="true">https://forum.qt.io/post/196540</guid><dc:creator><![CDATA[adrian]]></dc:creator><pubDate>Tue, 24 Sep 2013 15:13:51 GMT</pubDate></item><item><title><![CDATA[Reply to Qt 4.8.4 QtWebkit doesn&#x27;t load Javascript on Tue, 24 Sep 2013 13:30:53 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for your response.</p>
<p dir="auto">I've ensure that I've enabled the javascript attribute.<br />
When I execute "evaluateJavascript('console.log('test')'), the javascript engine does not return any result to invoke MyWebPage::javaScriptConsoleMessage function.<br />
I think the problem is into the WebKit Javascript engine, I am enabling the javascript attribute but it is not enabling it.<br />
I have tried to test a simple web page executing an alert('') function, and if I execute into a desktop envioment (linux X86) it works correctly. If I build the same code into a ARM enviroment, it not works. Any idea?</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://forum.qt.io/post/196532</link><guid isPermaLink="true">https://forum.qt.io/post/196532</guid><dc:creator><![CDATA[adrian]]></dc:creator><pubDate>Tue, 24 Sep 2013 13:30:53 GMT</pubDate></item><item><title><![CDATA[Reply to Qt 4.8.4 QtWebkit doesn&#x27;t load Javascript on Tue, 24 Sep 2013 08:44:14 GMT]]></title><description><![CDATA[<p dir="auto">please make sure:<br />
@<br />
myWebView-&gt;settings()-&gt;setAttribute(QWebSettings::JavascriptEnabled, true);<br />
@</p>
<p dir="auto">If it still doesn't work subclass QWebPage and reimplement javaScriptConsoleMessage():<br />
@<br />
void MyWebPage::javaScriptConsoleMessage ( const QString &amp; message, int lineNumber, const QString &amp; sourceID )<br />
{<br />
qDebug() &lt;&lt; "CONSOLE (" &lt;&lt; sourceId &lt;&lt; ":" &lt;&lt; lineNumber &lt;&lt; "):" &lt;&lt; message;<br />
}<br />
@<br />
Then you can see any javascript error which prevent your script to be loaded.</p>
]]></description><link>https://forum.qt.io/post/196507</link><guid isPermaLink="true">https://forum.qt.io/post/196507</guid><dc:creator><![CDATA[raven-worx]]></dc:creator><pubDate>Tue, 24 Sep 2013 08:44:14 GMT</pubDate></item></channel></rss>