0

This thread follows my question about how to embed a web application in a Qt executable.

My web application is a JQuery based application and I wouldn't modify it when embedding it in Qt.

In this application, I load an XML document asynchronously with the $.ajax(url [, settings]) function.

As the XML file is part of the Qt program, there is no HTTP server to return this file. So it seems the ajax request fails.

Is there any solution to bypass this problem?

EDIT

Actually, the XML file seems to be loaded. But [$.ajax(url [, settings])] called error(jqXHR, textStatus, errorThrown).

jqXHR contains the XML document, textStatus equals error and errorThrown is empty...

SOLUTION

I finally found the solution: Read local file from QWebView using Ajax request. Hope this helps.

Community
  • 1
  • 1
Maxbester
  • 2,435
  • 7
  • 42
  • 70
  • After some search, it may be a known bug [Bug 31875 - QWebView: Impossible to make XMLHttpRequest from locally stored HTML page](https://bugs.webkit.org/show_bug.cgi?id=31875). But the bug is still `assigned`... – Maxbester Dec 17 '12 at 10:37

1 Answers1

0

I think there are some incompatibility issues between JQuery and the QWebKit.

I finally managed to do ajax requests using the standard API: XMLHttpRequest. But I didn't manage to do it with JQuery.

Maxbester
  • 2,435
  • 7
  • 42
  • 70