Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The TQNPWidget class provides a TQWidget that is a web browser plugin window. More...
This class is part of the TQt Netscape Extension.
#include <qnp.h>
Inherits TQWidget.
This class is defined in the TQt Netscape Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API.
The TQNPWidget class provides a TQWidget that is a web browser plugin window.
Derive from TQNPWidget to create a widget that can be used as a web browser plugin window, or create one and add child widgets. Instances of TQNPWidget may only be created when TQNPInstance::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 TQNPWidget { TQWidget* 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(TQResizeEvent*) { // 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 TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.
Copyright © 2007 Trolltech | Trademarks | TQt 3.3.8
|