The QFocusEvent class contains event parameters for widget focus 事件。 更多...
继承 QEvent .
The QFocusEvent class contains event parameters for widget focus 事件。
Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, key presses (such as 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.
事件处理程序 QWidget.focusInEvent (), QWidget.focusOutEvent (), QGraphicsItem.focusInEvent and QGraphicsItem.focusOutEvent () receive focus events.
构造聚焦事件对象。
type 参数必须是 QEvent.FocusIn or QEvent.FocusOut 。 reason 描述聚焦改变的原因。
返回 true 若 type () 是 QEvent.FocusIn ;否则 returns false.
返回 true 若 type () 是 QEvent.FocusOut ;否则 returns false.
返回此聚焦事件的原因。