Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The QNPWidget class provides a QWidget that is a Web-browser plugin window.
This class is part of the Qt NSPlugin Extension. More...
#include <qnp.h>
Inherits QWidget.
This class is defined in the Qt NSPlugin Extension, which can be found in the qt/extensions directory. It is not included in the main Qt API.
The QNPWidget class provides a QWidget that is a Web-browser plugin window.
Derive from QNPWidget to create a widget that can be used as a Browser plugin window, or create one and add child widgets. Instances of QNPWidget may only be created when QNPInstance::newWindow() is called by the browser.
A common way to develop a plugin widget is to develop it as a stand-alone application window, then make it a child of a plugin widget to use it as a browser plugin. The technique is:
class MyPluginWindow : public QNPWidget { QWidget* child; public: MyPluginWindow() { // Some widget that is normally used as a top-level widget child = new MyIndependentlyDevelopedWidget(); // Use the background color of the web page child->setBackgroundColor( backgroundColor() ); // Fill the plugin widget child->setGeometry( 0, 0, width(), height() ); } void resizeEvent(QResizeEvent*) { // Fill the plugin widget child->resize(size()); } };
The default implementation is an empty window.
Example: grapher/grapher.cpp.
Example: grapher/grapher.cpp.
This file is part of the Qt toolkit. Copyright © 1995-2002 Trolltech. All Rights Reserved.
Copyright © 2002 Trolltech | Trademarks | Qt version 3.0.5
|