📄 qfocusevent.3qt
字号:
'\" t.TH QFocusEvent 3qt "9 December 2002" "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 NAMEQFocusEvent \- Event parameters for widget focus events.SH SYNOPSIS\fC#include <qevent.h>\fR.PPInherits QEvent..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQFocusEvent\fR ( Type type )".br.ti -1c.BI "bool \fBgotFocus\fR () const".br.ti -1c.BI "bool \fBlostFocus\fR () const".br.ti -1c.BI "enum \fBReason\fR { Mouse, Tab, Backtab, ActiveWindow, Popup, Shortcut, Other }".br.in -1c.SS "Static Public Members".in +1c.ti -1c.BI "Reason \fBreason\fR ()".br.ti -1c.BI "void \fBsetReason\fR ( Reason reason )".br.ti -1c.BI "void \fBresetReason\fR ()".br.in -1c.SH DESCRIPTIONThe QFocusEvent class contains event parameters for widget focus events..PPFocus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, keypresses (e.g. Tab or Backtab), the window system, popup menus, keyboard shortcuts or other application specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler..PPThe event handlers QWidget::focusInEvent() and QWidget::focusOutEvent() receive focus events..PPUse setReason() to set the reason for all focus events, and resetReason() to set the reason for all focus events to the reason in force before the last setReason() call..PPSee also QWidget::setFocus(), QWidget::focusPolicy, and Event Classes..SS "Member Type Documentation".SH "QFocusEvent::Reason"This enum specifies why the focus changed..TP\fCQFocusEvent::Mouse\fR - because of a mouse action..TP\fCQFocusEvent::Tab\fR - because of a Tab press..TP\fCQFocusEvent::Backtab\fR - because of a Backtab press (possibly including Shift/Control, e.g. Shift+Tab)..TP\fCQFocusEvent::ActiveWindow\fR - because the window system made this window (in)active..TP\fCQFocusEvent::Popup\fR - because the application opened/closed a popup that grabbed/released focus..TP\fCQFocusEvent::Shortcut\fR - because of a keyboard shortcut..TP\fCQFocusEvent::Other\fR - any other reason, usually application-specific..PPSee the keyboard focus overview for more about focus..SH MEMBER FUNCTION DOCUMENTATION.SH "QFocusEvent::QFocusEvent ( Type type )"Constructs a focus event object..PPThe \fItype\fR parameter must be either QEvent::FocusIn or QEvent::FocusOut..SH "bool QFocusEvent::gotFocus () const"Returns TRUE if the widget received the text input focus; otherwise returns FALSE..SH "bool QFocusEvent::lostFocus () const"Returns TRUE if the widget lost the text input focus; otherwise returns FALSE..SH "Reason QFocusEvent::reason ()\fC [static]\fR"Returns the reason for this focus event..PPSee also setReason()..SH "void QFocusEvent::resetReason ()\fC [static]\fR"Resets the reason for all future focus events to the value before the last setReason() call..PPSee also reason() and setReason()..SH "void QFocusEvent::setReason ( Reason reason )\fC [static]\fR"Sets the reason for all future focus events to \fIreason\fR..PPSee also reason() and resetReason()..SH "SEE ALSO".BR http://doc.trolltech.com/qfocusevent.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 (qfocusevent.3qt) and the Qtversion (3.1.1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -