user1216323
user1216323

Reputation:

Cookies are not working in QWebView

When I load an Url using the load method, like this:

load(QUrl("http://www.foo.com"));

Cookies work correctly with no problems. However, when I load the content using the setHtml method, like this:

setHtml(htmlCode, QUrl("http://www.foo.com));

The website indicates that cookies aren’t enabled in my browser. I wonder if this is a known issue, and whether there’s a way to have cookies working for the setHtml method.

Thanks in advance.

Upvotes: 2

Views: 655

Answers (1)

Rodrigo
Rodrigo

Reputation: 301

Cookies are from HTTP protocol, not part of HTML. You need a http server embedded, Take a look at this project

Upvotes: 1

Related Questions