Beispiel #1
0
/*!
    Sets \a graphic to be drawn when QtWebKit needs to draw an image of the
    given \a type.

    For example, when an image cannot be loaded, the pixmap specified by
    \l{QWebSettings::WebGraphic}{MissingImageGraphic} is drawn instead.

    \sa webGraphic()
*/
void QWebSettings::setWebGraphic(WebGraphic type, const QPixmap& graphic)
{
    WebGraphicHash* h = graphics();
    if (graphic.isNull())
        h->remove(type);
    else
        h->insert(type, graphic);
}
Beispiel #2
0
void Image::setPlatformResource(const char* name, const QPixmap& pixmap)
{
    WebGraphicHash* h = graphics();
    if (pixmap.isNull())
        h->remove(name);
    else
        h->insert(name, pixmap);
}