Skip to content

Commit

Permalink
enable and test xdomain xmlhttpreq
Browse files Browse the repository at this point in the history
  • Loading branch information
RJ committed Dec 23, 2009
1 parent 72e8e7f commit 49e46e2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions mainwindow.cpp
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions www/index.html
Expand Up @@ -75,5 +75,7 @@ <h1>Musickit test page</h1>

<div id="log" style="font:fixed; border:1px solid red;">
</div>
<hr/>
<a href="test.html">test page</a>
</body>
</html>
13 changes: 13 additions & 0 deletions www/test.html
@@ -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.