QFocusEvent Class
The QFocusEvent class contains event parameters for widget and window focus events. More…
| Header | #include <QFocusEvent> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Gui) |
| Module | Nt GUI C++ Classes |
| Inherits | QEvent |
List of all members, including inherited members
Public Functions
| QFocusEvent(Type type) | |
| bool | gotFocus() const |
| bool | lostFocus() const |
Reimplemented Public Functions
| QFocusEvent * | clone() const |
Detailed Description
Focus events arrive as FocusIn when a window gets the keyboard focus and as FocusOut when it loses it.
See also QWindow::focusInEvent().
Differences from Qt
There is no focus reason.
Member Function Documentation
QFocusEvent::QFocusEvent(Type type)
Constructs a focus event of the given type, FocusIn or FocusOut.
QFocusEvent * QFocusEvent::clone() const
Reimplements QEvent::clone().
bool QFocusEvent::gotFocus() const
Returns true for a FocusIn event.
bool QFocusEvent::lostFocus() const
Returns true for a FocusOut event.