QNPWidget(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– 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 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