📄 qnpwidget.3qt
字号:
'\" t.TH QNPWidget 3qt "2 September 2005" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQNPWidget \- QWidget that is a web browser plugin window.SH SYNOPSISThis class is part of the \fBQt Netscape Extension\fR..PP\fC#include <qnp.h>\fR.PPInherits QWidget..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQNPWidget\fR ()".br.ti -1c.BI "\fB~QNPWidget\fR ()".br.ti -1c.BI "virtual void \fBenterInstance\fR ()".br.ti -1c.BI "virtual void \fBleaveInstance\fR ()".br.ti -1c.BI "QNPInstance * \fBinstance\fR ()".br.in -1c.SH DESCRIPTIONThis class is defined in the \fBQt Netscape Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main Qt API..PPThe QNPWidget class provides a QWidget that is a web browser plugin window..PPDerive from QNPWidget to create a widget that can be used as a web 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..PPA common way to develop a plugin widget is to develop it as a stand-alone application window, then make it a \fIchild\fR of a plugin widget to use it as a browser plugin. The technique is:.PP.nf.brclass MyPluginWindow : public QNPWidget.br{.br QWidget* child;.brpublic:.br MyPluginWindow().br {.br // Some widget that is normally used as a top-level widget.br child = new MyIndependentlyDevelopedWidget();.br.br // Use the background color of the web page.br child->setBackgroundColor( backgroundColor() );.br.br // Fill the plugin widget.br child->setGeometry( 0, 0, width(), height() );.br }.br.br void resizeEvent(QResizeEvent*).br {.br // Fill the plugin widget.br child->resize(size());.br }.br};.fi.PPThe default implementation is an empty window..SH MEMBER FUNCTION DOCUMENTATION.SH "QNPWidget::QNPWidget ()"Creates a QNPWidget..SH "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. The bindings will change the QWidget::winId() of the window when the window is resized, but this should not affect normal widget behavior..SH "void QNPWidget::enterInstance ()\fC [virtual]\fR"Called when the mouse enters the plugin window. Does nothing by default..PPExample: grapher/grapher.cpp..SH "QNPInstance * QNPWidget::instance ()"Returns the instance for which this widget is the plugin window..SH "void QNPWidget::leaveInstance ()\fC [virtual]\fR"Called when the mouse leaves the plugin window. Does nothing by default..PPExample: grapher/grapher.cpp..SH "SEE ALSO".BR http://doc.trolltech.com/qnpwidget.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qnpwidget.3qt) and the Qtversion (3.3.5).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -