citizen conn
citizen conn

Reputation: 15390

How to get the error message from a failed url load in a Qt WebView

say I have a basic QML file which listens for the onLoadFailed signal like this:

import QtQuick 1.1
import QtWebKit 1.0

WebView
{
  onLoadFailed: {

  }

  url: "bogus_url"
}  

In this example, I should get a 404 or a 500. What should I put in the onLoadFailed to output the error message that was returned?

Upvotes: 2

Views: 907

Answers (1)

TheHuge_
TheHuge_

Reputation: 1039

I'm afraid you can't do it using a simple QML WebView.

You can use a [bad] trick described in this thread on the QT forum.

Otherwise you'll have to make your own QDeclarativeItem extending the WebView with all the infos you need.

Upvotes: 1

Related Questions