Permalink
Browse files

enable and test xdomain xmlhttpreq

  • Loading branch information...
1 parent 72e8e7f commit 49e46e2c1807e93c2c33cba94ff5e9bffe2cf4a8 @RJ committed Dec 23, 2009
Showing with 16 additions and 0 deletions.
  1. +1 −0 mainwindow.cpp
  2. +2 −0 www/index.html
  3. +13 −0 www/test.html
View
@@ -52,6 +52,7 @@ void MainWindow::setupUi()
QGridLayout *layout = new QGridLayout();
webView = new QWebView();
+ webView->settings()->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls,true); // needs QT >= 4.6
playurlBtn = new QPushButton("Play Stream");
playfileBtn = new QPushButton("Play Local File");
View
@@ -75,5 +75,7 @@
<div id="log" style="font:fixed; border:1px solid red;">
</div>
+<hr/>
+<a href="test.html">test page</a>
</body>
</html>
View
@@ -0,0 +1,13 @@
+<html><body>
+<h1>test</h1>
+<a href="index.html">INDEX</a>
+<h3>Loading page</h3>
+
+<script type="text/javascript">
+var req = new XMLHttpRequest();
+req.open("GET", "http://www.google.com/", false);
+req.send("");
+document.write(req.responseText);
+</script>
+
+</body></html>

0 comments on commit 49e46e2

Please sign in to comment.