ErrorPageExtensionReturn Class

( QWebPage::ErrorPageExtensionReturn )

The ErrorPageExtensionReturn describes the error page, which will be shown for the frame for which the error occured. 更多...

头: #include <ErrorPageExtensionReturn>
Since: Qt 4.6
继承:

公共函数

ErrorPageExtensionReturn ()

公共变量

QUrl baseUrl
QByteArray content
QString contentType
QString encoding

详细描述

The ErrorPageExtensionReturn describes the error page, which will be shown for the frame for which the error occured.

The ErrorPageExtensionReturn class holds the data needed for creating an error page. Some are optional such as contentType , which defaults to "text/html", as well as the encoding , which is assumed to be UTF-8 if not indicated otherwise.

The error page is stored in the content byte array, as HTML content. In order to convert a QString to a byte array, the QString::toUtf8 () method can be used.

External objects such as stylesheets or images referenced in the HTML are located relative to baseUrl .

另请参阅 QWebPage::extension (), QWebPage::ErrorPageExtensionOption ,和 QString::toUtf8 ().

成员函数文档编制

ErrorPageExtensionReturn:: ErrorPageExtensionReturn ()

Constructs a new error page object.

成员变量文档编制

QUrl ErrorPageExtensionReturn:: baseUrl

This variable holds the base url.

External objects such as stylesheets or images referenced in the HTML are located relative to this url.

QByteArray ErrorPageExtensionReturn:: content

This variable holds the HTML content of the error page.

QString ErrorPageExtensionReturn:: contentType

This variable holds the error page's content type.

QString ErrorPageExtensionReturn:: encoding

This variable holds the error page encoding.