QWebPluginFactory Class ReferenceThe QWebPluginFactory class is used to embed custom data types in web pages. More... #include <QWebPluginFactory> Inherits: QObject. This class was introduced in Qt 4.4. Public Types
Public Functions
Additional Inherited Members
Detailed DescriptionThe QWebPluginFactory class is used to embed custom data types in web pages. The HTML <object> tag is used to embed arbitrary content into a web page, for example: <object type="application/x-pdf" data="http://qt.nokia.com/document.pdf" width="500" height="400"></object> QtWebkit will natively handle the most basic data types like text/html and image/jpeg, but for any advanced or custom data types you will need to provide a handler yourself. QWebPluginFactory is a factory for creating plugins for QWebPage, where each plugin provides support for one or more data types. A plugin factory can be installed on a QWebPage using QWebPage::setPluginFactory(). Note: The plugin factory is only used if plugins are enabled through QWebSettings. You provide a QWebPluginFactory by implementing the plugins() and the create() methods. For plugins() it is necessary to describe the plugins the factory can create, including a description and the supported MIME types. The MIME types each plugin can handle should match the ones specified in in the HTML <object> tag of your content. The create() method is called if the requested MIME type is supported. The implementation has to return a new instance of the plugin requested for the given MIME type and the specified URL. The plugins themselves are subclasses of QObject, but currently only plugins based on either QWidget or QGraphicsWidget are supported. Member Function Documentation
|
Parameter | Value |
---|---|
mimeType | "application/x-pdf" |
url | "http://qt.nokia.com/document.pdf" |
argumentNames | "showTableOfContents" "hideThumbnails" |
argumentVaues | "true" "false" |
Note: Ownership of the returned object will be transferred to the caller.
This function is reimplemented in subclasses to return a list of supported plugins the factory can create.
Note: Currently, this function is only called when JavaScript programs access the global plugins or mimetypes objects.
This function is called to refresh the list of supported plugins. It may be called after a new plugin has been installed in the system.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.8 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com