QNPWidget(3qt)
π QNPWidget β the manual, but make it make sense π
okay so bestie, welcome to QNPWidget(3qt) from the Qt crew β¨ this is the one about a QWidget that's literally a web browser plugin window. buckle up, she's niche but she's iconic π
πΈ NAME πΈ
QNPWidget β a QWidget that is a web browser plugin window. no cap, that's the whole vibe πͺ
β¨ SYNOPSIS β¨
so this class is part of the Qt Netscape Extension, okay? say it with me π
#include <qnp.h>
Inherits QWidget.
π Public Members π
QNPWidget ()~QNPWidget ()virtual void enterInstance ()virtual void leaveInstance ()QNPInstance * instance ()
π¦ DESCRIPTION π¦
This class is defined in the Qt Netscape Extension, which lives in the qt/extensions directory. π«Ά She is not included in the main Qt API β so don't go looking for her in the main character section, she's off in her own little corner and that's on purpose.
The QNPWidget class provides a QWidget that is a web browser plugin window. that's it, that's the whole job π
So here's the tea: you derive from QNPWidget to create a widget that can be used as a web browser plugin window, or you can just create one and add child widgets to it. But β and this is important β instances of QNPWidget may only be created when QNPInstance::newWindow() is called by the browser. π only then. no freelancing.
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 literally this, no edits:
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. π«₯ empty. blank. a little void. slay, honestly.
π MEMBER FUNCTION DOCUMENTATION π
π QNPWidget::QNPWidget ()
Creates a QNPWidget. new baby alert πΌ
π QNPWidget::~QNPWidget ()
Destroys the window. This will be called by the plugin binding code when the window is no longer required. The web browser will delete windows when they leave the page. π she's gone, she's off the page, rest in peace queen.
The bindings will change the QWidget::winId() of the window when the window is resized, but this should not affect normal widget behavior. so like, don't panic about it π«Ά
π void QNPWidget::enterInstance () [virtual]
Called when the mouse enters the plugin window. Does nothing by default. π»
Example: grapher/grapher.cpp.
π QNPInstance * QNPWidget::instance ()
Returns the instance for which this widget is the plugin window. πͺ your widget's origin story, basically.
π void QNPWidget::leaveInstance () [virtual]
Called when the mouse leaves the plugin window. Does nothing by default. bye bestie π
Example: grapher/grapher.cpp.
π₯ SEE ALSO π₯
go read, iykyk π
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. π legal girlies stay winning.
π AUTHOR π
Generated automatically from the source code. π€ no human author, just vibes and a script.
π BUGS π
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. π fr fr, be a helpful icon.
The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. π«£ (we're the unofficial girlies, and that's fine)
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qnpwidget.3qt) and the Qt version (3.3.8). π include both or the report doesn't count, periodt.
okay that's the whole page bestie, you're now certified in QNPWidget lore π β¨
this little love letter was brought to you by Trolltech AS, dated 2 February 2007, and she answers to the name QNPWidget(3qt) β take care of her π«Άπ
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms