Qt 4.8
Public Types | Public Functions | Static Public Functions | Protected Variables | Properties | Friends | List of all members
QEvent Class Reference

The QEvent class is the base class of all event classes. More...

#include <qcoreevent.h>

Inheritance diagram for QEvent:
QAccessibleEvent QActionEvent QChildEvent QClipboardEvent QCloseEvent QDBusConnectionCallbackEvent QDeclarativeListModelWorkerAgent::Sync QDeclarativePixmapReply::Event QDragLeaveEvent QDragResponseEvent QDropEvent QDynamicPropertyChangeEvent QFileOpenEvent QFocusEvent QFutureCallOutEvent QGestureEvent QGraphicsSceneEvent QHelpEvent QHideEvent QHoverEvent QIconDragEvent QInputEvent QInputMethodEvent QMetaCallEvent QMoveEvent QNativeGestureEvent QPaintEvent QResizeEvent QScriptDebuggerCommandEvent QScriptDebuggerCommandFinishedEvent QScriptDebuggerEventEvent QShortcutEvent QShowEvent QStateMachine::SignalEvent QStateMachine::WrappedEvent QStatusTipEvent QTimerEvent QToolBarChangeEvent QUpdateLaterEvent QWhatsThisClickedEvent QWindowStateChangeEvent WorkerDataEvent WorkerErrorEvent WorkerLoadEvent WorkerRemoveEvent

Public Types

enum  Type {
  None = 0, Timer = 1, MouseButtonPress = 2, MouseButtonRelease = 3,
  MouseButtonDblClick = 4, MouseMove = 5, KeyPress = 6, KeyRelease = 7,
  FocusIn = 8, FocusOut = 9, Enter = 10, Leave = 11,
  Paint = 12, Move = 13, Resize = 14, Create = 15,
  Destroy = 16, Show = 17, Hide = 18, Close = 19,
  Quit = 20, ParentChange = 21, ParentAboutToChange = 131, ThreadChange = 22,
  WindowActivate = 24, WindowDeactivate = 25, ShowToParent = 26, HideToParent = 27,
  Wheel = 31, WindowTitleChange = 33, WindowIconChange = 34, ApplicationWindowIconChange = 35,
  ApplicationFontChange = 36, ApplicationLayoutDirectionChange = 37, ApplicationPaletteChange = 38, PaletteChange = 39,
  Clipboard = 40, Speech = 42, MetaCall = 43, SockAct = 50,
  WinEventAct = 132, DeferredDelete = 52, DragEnter = 60, DragMove = 61,
  DragLeave = 62, Drop = 63, DragResponse = 64, ChildAdded = 68,
  ChildPolished = 69, ChildRemoved = 71, ShowWindowRequest = 73, PolishRequest = 74,
  Polish = 75, LayoutRequest = 76, UpdateRequest = 77, UpdateLater = 78,
  EmbeddingControl = 79, ActivateControl = 80, DeactivateControl = 81, ContextMenu = 82,
  InputMethod = 83, AccessibilityPrepare = 86, TabletMove = 87, LocaleChange = 88,
  LanguageChange = 89, LayoutDirectionChange = 90, Style = 91, TabletPress = 92,
  TabletRelease = 93, OkRequest = 94, HelpRequest = 95, IconDrag = 96,
  FontChange = 97, EnabledChange = 98, ActivationChange = 99, StyleChange = 100,
  IconTextChange = 101, ModifiedChange = 102, MouseTrackingChange = 109, WindowBlocked = 103,
  WindowUnblocked = 104, WindowStateChange = 105, ToolTip = 110, WhatsThis = 111,
  StatusTip = 112, ActionChanged = 113, ActionAdded = 114, ActionRemoved = 115,
  FileOpen = 116, Shortcut = 117, ShortcutOverride = 51, WhatsThisClicked = 118,
  ToolBarChange = 120, ApplicationActivate = 121, ApplicationActivated = ApplicationActivate, ApplicationDeactivate = 122,
  ApplicationDeactivated = ApplicationDeactivate, QueryWhatsThis = 123, EnterWhatsThisMode = 124, LeaveWhatsThisMode = 125,
  ZOrderChange = 126, HoverEnter = 127, HoverLeave = 128, HoverMove = 129,
  AccessibilityHelp = 119, AccessibilityDescription = 130, AcceptDropsChange = 152, MenubarUpdated = 153,
  ZeroTimerEvent = 154, GraphicsSceneMouseMove = 155, GraphicsSceneMousePress = 156, GraphicsSceneMouseRelease = 157,
  GraphicsSceneMouseDoubleClick = 158, GraphicsSceneContextMenu = 159, GraphicsSceneHoverEnter = 160, GraphicsSceneHoverMove = 161,
  GraphicsSceneHoverLeave = 162, GraphicsSceneHelp = 163, GraphicsSceneDragEnter = 164, GraphicsSceneDragMove = 165,
  GraphicsSceneDragLeave = 166, GraphicsSceneDrop = 167, GraphicsSceneWheel = 168, KeyboardLayoutChange = 169,
  DynamicPropertyChange = 170, TabletEnterProximity = 171, TabletLeaveProximity = 172, NonClientAreaMouseMove = 173,
  NonClientAreaMouseButtonPress = 174, NonClientAreaMouseButtonRelease = 175, NonClientAreaMouseButtonDblClick = 176, MacSizeChange = 177,
  ContentsRectChange = 178, MacGLWindowChange = 179, FutureCallOut = 180, GraphicsSceneResize = 181,
  GraphicsSceneMove = 182, CursorChange = 183, ToolTipChange = 184, NetworkReplyUpdated = 185,
  GrabMouse = 186, UngrabMouse = 187, GrabKeyboard = 188, UngrabKeyboard = 189,
  MacGLClearDrawable = 191, StateMachineSignal = 192, StateMachineWrapped = 193, TouchBegin = 194,
  TouchUpdate = 195, TouchEnd = 196, NativeGesture = 197, RequestSoftwareInputPanel = 199,
  CloseSoftwareInputPanel = 200, UpdateSoftKeys = 201, WinIdChange = 203, Gesture = 198,
  GestureOverride = 202, PlatformPanel = 212, User = 1000, MaxUser = 65535
}
 This enum type defines the valid event types in Qt. More...
 

Public Functions

void accept ()
 Sets the accept flag of the event object, the equivalent of calling setAccepted(true). More...
 
void ignore ()
 Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). More...
 
bool isAccepted () const
 
 QEvent (Type type)
 Contructs an event object of type type. More...
 
void setAccepted (bool accepted)
 
bool spontaneous () const
 Returns true if the event originated outside the application (a system event); otherwise returns false. More...
 
Type type () const
 Returns the event type. More...
 
virtual ~QEvent ()
 Destroys the event. More...
 

Static Public Functions

static int registerEventType (int hint=-1)
 Registers and returns a custom event type. More...
 

Protected Variables

QEventPrivate * d
 
ushort t
 

Properties

ushort m_accept: 1
 
ushort posted: 1
 
ushort reserved: 13
 
ushort spont: 1
 

Friends

class Q3AccelManager
 
class QApplication
 
class QApplicationPrivate
 
class QCoreApplication
 
class QCoreApplicationPrivate
 
class QETWidget
 
class QGestureManager
 
class QGraphicsScene
 
class QGraphicsScenePrivate
 
class QGraphicsView
 
class QGraphicsViewPrivate
 
class QShortcutMap
 
class QThreadData
 

Detailed Description

The QEvent class is the base class of all event classes.

Event objects contain event parameters.

Qt's main event loop (QCoreApplication::exec()) fetches native window system events from the event queue, translates them into QEvents, and sends the translated events to QObject.

In general, events come from the underlying window system (spontaneous() returns true), but it is also possible to manually send events using QCoreApplication::sendEvent() and QCoreApplication::postEvent() (spontaneous() returns false).

QObjects receive events by having their QObject::event() function called. The function can be reimplemented in subclasses to customize event handling and add additional event types; QWidget::event() is a notable example. By default, events are dispatched to event handlers like QObject::timerEvent() and QWidget::mouseMoveEvent(). QObject::installEventFilter() allows an object to intercept events destined for another object.

The basic QEvent contains only an event type parameter and an "accept" flag. The accept flag set with accept(), and cleared with ignore(). It is set by default, but don't rely on this as subclasses may choose to clear it in their constructor.

Subclasses of QEvent contain additional parameters that describe the particular event.

See also
QObject::event(), QObject::installEventFilter(), QWidget::event(), QCoreApplication::sendEvent(), QCoreApplication::postEvent(), QCoreApplication::processEvents()

Definition at line 56 of file qcoreevent.h.

Enumerations

◆ Type

This enum type defines the valid event types in Qt.

The event types and the specialized classes for each type are as follows:

  • None Not an event.
  • AccessibilityDescription Used to query accessibility description texts (QAccessibleEvent).
  • AccessibilityHelp Used to query accessibility help texts (QAccessibleEvent).
  • AccessibilityPrepare Accessibility information is requested.
  • ActionAdded A new action has been added (QActionEvent).
  • ActionChanged An action has been changed (QActionEvent).
  • ActionRemoved An action has been removed (QActionEvent).
  • ActivationChange A widget's top-level window activation state has changed.
  • ApplicationActivate The application has been made available to the user.
  • ApplicationActivated This enum has been deprecated. Use ApplicationActivate instead.
  • ApplicationDeactivate The application has been suspended, and is unavailable to the user.
  • ApplicationFontChange The default application font has changed.
  • ApplicationLayoutDirectionChange The default application layout direction has changed.
  • ApplicationPaletteChange The default application palette has changed.
  • ApplicationWindowIconChange The application's icon has changed.
  • ChildAdded An object gets a child (QChildEvent).
  • ChildInserted An object gets a child (QChildEvent). Qt3Support only, use ChildAdded instead.
  • ChildPolished A widget child gets polished (QChildEvent).
  • ChildRemoved An object loses a child (QChildEvent).
  • Clipboard The clipboard contents have changed (QClipboardEvent).
  • Close Widget was closed (QCloseEvent).
  • CloseSoftwareInputPanel A widget wants to close the software input panel (SIP).
  • ContentsRectChange The margins of the widget's content rect changed.
  • ContextMenu Context popup menu (QContextMenuEvent).
  • CursorChange The widget's cursor has changed.
  • DeferredDelete The object will be deleted after it has cleaned up.
  • DragEnter The cursor enters a widget during a drag and drop operation (QDragEnterEvent).
  • DragLeave The cursor leaves a widget during a drag and drop operation (QDragLeaveEvent).
  • DragMove A drag and drop operation is in progress (QDragMoveEvent).
  • Drop A drag and drop operation is completed (QDropEvent).
  • EnabledChange Widget's enabled state has changed.
  • Enter Mouse enters widget's boundaries.
  • EnterEditFocus An editor widget gains focus for editing.
  • EnterWhatsThisMode Send to toplevel widgets when the application enters "What's This?" mode.
  • FileOpen File open request (QFileOpenEvent).
  • FocusIn Widget gains keyboard focus (QFocusEvent).
  • FocusOut Widget loses keyboard focus (QFocusEvent).
  • FontChange Widget's font has changed.
  • GrabKeyboard Item gains keyboard grab (QGraphicsItem only).
  • GrabMouse Item gains mouse grab (QGraphicsItem only).
  • GraphicsSceneContextMenu Context popup menu over a graphics scene (QGraphicsSceneContextMenuEvent).
  • GraphicsSceneDragEnter The cursor enters a graphics scene during a drag and drop operation (QGraphicsSceneDragDropEvent).
  • GraphicsSceneDragLeave The cursor leaves a graphics scene during a drag and drop operation (QGraphicsSceneDragDropEvent).
  • GraphicsSceneDragMove A drag and drop operation is in progress over a scene (QGraphicsSceneDragDropEvent).
  • GraphicsSceneDrop A drag and drop operation is completed over a scene (QGraphicsSceneDragDropEvent).
  • GraphicsSceneHelp The user requests help for a graphics scene (QHelpEvent).
  • GraphicsSceneHoverEnter The mouse cursor enters a hover item in a graphics scene (QGraphicsSceneHoverEvent).
  • GraphicsSceneHoverLeave The mouse cursor leaves a hover item in a graphics scene (QGraphicsSceneHoverEvent).
  • GraphicsSceneHoverMove The mouse cursor moves inside a hover item in a graphics scene (QGraphicsSceneHoverEvent).
  • GraphicsSceneMouseDoubleClick Mouse press again (double click) in a graphics scene (QGraphicsSceneMouseEvent).
  • GraphicsSceneMouseMove Move mouse in a graphics scene (QGraphicsSceneMouseEvent).
  • GraphicsSceneMousePress Mouse press in a graphics scene (QGraphicsSceneMouseEvent).
  • GraphicsSceneMouseRelease Mouse release in a graphics scene (QGraphicsSceneMouseEvent).
  • GraphicsSceneMove Widget was moved (QGraphicsSceneMoveEvent).
  • GraphicsSceneResize Widget was resized (QGraphicsSceneResizeEvent).
  • GraphicsSceneWheel Mouse wheel rolled in a graphics scene (QGraphicsSceneWheelEvent).
  • Hide Widget was hidden (QHideEvent).
  • HideToParent A child widget has been hidden.
  • HoverEnter The mouse cursor enters a hover widget (QHoverEvent).
  • HoverLeave The mouse cursor leaves a hover widget (QHoverEvent).
  • HoverMove The mouse cursor moves inside a hover widget (QHoverEvent).
  • IconDrag The main icon of a window has been dragged away (QIconDragEvent).
  • IconTextChange Widget's icon text has been changed.
  • InputMethod An input method is being used (QInputMethodEvent).
  • KeyPress Key press (QKeyEvent).
  • KeyRelease Key release (QKeyEvent).
  • LanguageChange The application translation changed.
  • LayoutDirectionChange The direction of layouts changed.
  • LayoutRequest Widget layout needs to be redone.
  • Leave Mouse leaves widget's boundaries.
  • LeaveEditFocus An editor widget loses focus for editing.
  • LeaveWhatsThisMode Send to toplevel widgets when the application leaves "What's This?" mode.
  • LocaleChange The system locale has changed.
  • NonClientAreaMouseButtonDblClick A mouse double click occurred outside the client area.
  • NonClientAreaMouseButtonPress A mouse button press occurred outside the client area.
  • NonClientAreaMouseButtonRelease A mouse button release occurred outside the client area.
  • NonClientAreaMouseMove A mouse move occurred outside the client area.
  • MacSizeChange The user changed his widget sizes (Mac OS X only).
  • MenubarUpdated The window's menu bar has been updated.
  • MetaCall An asynchronous method invocation via QMetaObject::invokeMethod().
  • ModifiedChange Widgets modification state has been changed.
  • MouseButtonDblClick Mouse press again (QMouseEvent).
  • MouseButtonPress Mouse press (QMouseEvent).
  • MouseButtonRelease Mouse release (QMouseEvent).
  • MouseMove Mouse move (QMouseEvent).
  • MouseTrackingChange The mouse tracking state has changed.
  • Move Widget's position changed (QMoveEvent).
  • Paint Screen update necessary (QPaintEvent).
  • PaletteChange Palette of the widget changed.
  • ParentAboutToChange The widget parent is about to change.
  • ParentChange The widget parent has changed.
  • PlatformPanel A platform specific panel has been requested.
  • Polish The widget is polished.
  • PolishRequest The widget should be polished.
  • QueryWhatsThis The widget should accept the event if it has "What's This?" help.
  • RequestSoftwareInputPanel A widget wants to open a software input panel (SIP).
  • Resize Widget's size changed (QResizeEvent).
  • Shortcut Key press in child for shortcut key handling (QShortcutEvent).
  • ShortcutOverride Key press in child, for overriding shortcut key handling (QKeyEvent).
  • Show Widget was shown on screen (QShowEvent).
  • ShowToParent A child widget has been shown.
  • SockAct Socket activated, used to implement QSocketNotifier.
  • StateMachineSignal A signal delivered to a state machine (QStateMachine::SignalEvent).
  • StateMachineWrapped The event is a wrapper for, i.e., contains, another event (QStateMachine::WrappedEvent).
  • StatusTip A status tip is requested (QStatusTipEvent).
  • StyleChange Widget's style has been changed.
  • TabletMove Wacom tablet move (QTabletEvent).
  • TabletPress Wacom tablet press (QTabletEvent).
  • TabletRelease Wacom tablet release (QTabletEvent).
  • OkRequest Ok button in decoration pressed. Supported only for Windows CE.
  • TabletEnterProximity Wacom tablet enter proximity event (QTabletEvent), sent to QApplication.
  • TabletLeaveProximity Wacom tablet leave proximity event (QTabletEvent), sent to QApplication.
  • Timer Regular timer events (QTimerEvent).
  • ToolBarChange The toolbar button is toggled on Mac OS X.
  • ToolTip A tooltip was requested (QHelpEvent).
  • ToolTipChange The widget's tooltip has changed.
  • UngrabKeyboard Item loses keyboard grab (QGraphicsItem only).
  • UngrabMouse Item loses mouse grab (QGraphicsItem only).
  • UpdateLater The widget should be queued to be repainted at a later time.
  • UpdateRequest The widget should be repainted.
  • WhatsThis The widget should reveal "What's This?" help (QHelpEvent).
  • WhatsThisClicked A link in a widget's "What's This?" help was clicked.
  • Wheel Mouse wheel rolled (QWheelEvent).
  • WinEventAct A Windows-specific activation event has occurred.
  • WindowActivate Window was activated.
  • WindowBlocked The window is blocked by a modal dialog.
  • WindowDeactivate Window was deactivated.
  • WindowIconChange The window's icon has changed.
  • WindowStateChange The window's state (minimized, maximized or full-screen) has changed (QWindowStateChangeEvent).
  • WindowTitleChange The window title has changed.
  • WindowUnblocked The window is unblocked after a modal dialog exited.
  • ZOrderChange The widget's z-order has changed. This event is never sent to top level windows.
  • KeyboardLayoutChange The keyboard layout has changed.
  • DynamicPropertyChange A dynamic property was added, changed or removed from the object.
  • TouchBegin Beginning of a sequence of touch-screen and/or track-pad events (QTouchEvent)
  • TouchUpdate Touch-screen event (QTouchEvent)
  • TouchEnd End of touch-event sequence (QTouchEvent)
  • WinIdChange The window system identifer for this native widget has changed
  • Gesture A gesture was triggered (QGestureEvent)
  • GestureOverride A gesture override was triggered (QGestureEvent)

User events should have values between User and MaxUser:

  • User User-defined event.
  • MaxUser Last user event ID.

For convenience, you can use the registerEventType() function to register and reserve a custom event type for your application. Doing so will allow you to avoid accidentally re-using a custom event type already in use elsewhere in your application.

  • Accel
  • AccelAvailable
  • AccelOverride
  • AcceptDropsChange
  • ActivateControl
  • CaptionChange
  • ChildInsertedRequest
  • ChildInserted
  • Create
  • DeactivateControl
  • Destroy
  • DragResponse
  • EmbeddingControl
  • HelpRequest
  • IconChange
  • LayoutHint
  • Quit
  • Reparent
  • ShowWindowRequest
  • Speech
  • Style
  • ThreadChange
  • ZeroTimerEvent
  • ApplicationActivated
  • ApplicationDeactivated
  • MacGLWindowChange
  • MacGLClearDrawable
  • NetworkReplyUpdated
  • FutureCallOut
  • UpdateSoftKeys
  • NativeGesture
Enumerator
None 
Timer 
MouseButtonPress 
MouseButtonRelease 
MouseButtonDblClick 
MouseMove 
KeyPress 
KeyRelease 
FocusIn 
FocusOut 
Enter 
Leave 
Paint 
Move 
Resize 
Create 
Destroy 
Show 
Hide 
Close 
Quit 
ParentChange 
ParentAboutToChange 
ThreadChange 
WindowActivate 
WindowDeactivate 
ShowToParent 
HideToParent 
Wheel 
WindowTitleChange 
WindowIconChange 
ApplicationWindowIconChange 
ApplicationFontChange 
ApplicationLayoutDirectionChange 
ApplicationPaletteChange 
PaletteChange 
Clipboard 
Speech 
MetaCall 
SockAct 
WinEventAct 
DeferredDelete 
DragEnter 
DragMove 
DragLeave 
Drop 
DragResponse 
ChildAdded 
ChildPolished 
ChildRemoved 
ShowWindowRequest 
PolishRequest 
Polish 
LayoutRequest 
UpdateRequest 
UpdateLater 
EmbeddingControl 
ActivateControl 
DeactivateControl 
ContextMenu 
InputMethod 
AccessibilityPrepare 
TabletMove 
LocaleChange 
LanguageChange 
LayoutDirectionChange 
Style 
TabletPress 
TabletRelease 
OkRequest 
HelpRequest 
IconDrag 
FontChange 
EnabledChange 
ActivationChange 
StyleChange 
IconTextChange 
ModifiedChange 
MouseTrackingChange 
WindowBlocked 
WindowUnblocked 
WindowStateChange 
ToolTip 
WhatsThis 
StatusTip 
ActionChanged 
ActionAdded 
ActionRemoved 
FileOpen 
Shortcut 
ShortcutOverride 
WhatsThisClicked 
ToolBarChange 
ApplicationActivate 
ApplicationActivated 
ApplicationDeactivate 
ApplicationDeactivated 
QueryWhatsThis 
EnterWhatsThisMode 
LeaveWhatsThisMode 
ZOrderChange 
HoverEnter 
HoverLeave 
HoverMove 
AccessibilityHelp 
AccessibilityDescription 
AcceptDropsChange 
MenubarUpdated 
ZeroTimerEvent 
GraphicsSceneMouseMove 
GraphicsSceneMousePress 
GraphicsSceneMouseRelease 
GraphicsSceneMouseDoubleClick 
GraphicsSceneContextMenu 
GraphicsSceneHoverEnter 
GraphicsSceneHoverMove 
GraphicsSceneHoverLeave 
GraphicsSceneHelp 
GraphicsSceneDragEnter 
GraphicsSceneDragMove 
GraphicsSceneDragLeave 
GraphicsSceneDrop 
GraphicsSceneWheel 
KeyboardLayoutChange 
DynamicPropertyChange 
TabletEnterProximity 
TabletLeaveProximity 
NonClientAreaMouseMove 
NonClientAreaMouseButtonPress 
NonClientAreaMouseButtonRelease 
NonClientAreaMouseButtonDblClick 
MacSizeChange 
ContentsRectChange 
MacGLWindowChange 
FutureCallOut 
GraphicsSceneResize 
GraphicsSceneMove 
CursorChange 
ToolTipChange 
NetworkReplyUpdated 
GrabMouse 
UngrabMouse 
GrabKeyboard 
UngrabKeyboard 
MacGLClearDrawable 
StateMachineSignal 
StateMachineWrapped 
TouchBegin 
TouchUpdate 
TouchEnd 
NativeGesture 
RequestSoftwareInputPanel 
CloseSoftwareInputPanel 
UpdateSoftKeys 
WinIdChange 
Gesture 
GestureOverride 
PlatformPanel 
User 
MaxUser 

Definition at line 62 of file qcoreevent.h.

62  {
63  /*
64  If you get a strange compiler error on the line with None,
65  it's probably because you're also including X11 headers,
66  which #define the symbol None. Put the X11 includes after
67  the Qt includes to solve this problem.
68  */
69  None = 0, // invalid event
70  Timer = 1, // timer event
71  MouseButtonPress = 2, // mouse button pressed
72  MouseButtonRelease = 3, // mouse button released
73  MouseButtonDblClick = 4, // mouse button double click
74  MouseMove = 5, // mouse move
75  KeyPress = 6, // key pressed
76  KeyRelease = 7, // key released
77  FocusIn = 8, // keyboard focus received
78  FocusOut = 9, // keyboard focus lost
79  Enter = 10, // mouse enters widget
80  Leave = 11, // mouse leaves widget
81  Paint = 12, // paint widget
82  Move = 13, // move widget
83  Resize = 14, // resize widget
84  Create = 15, // after widget creation
85  Destroy = 16, // during widget destruction
86  Show = 17, // widget is shown
87  Hide = 18, // widget is hidden
88  Close = 19, // request to close widget
89  Quit = 20, // request to quit application
90  ParentChange = 21, // widget has been reparented
91  ParentAboutToChange = 131, // sent just before the parent change is done
92 #ifdef QT3_SUPPORT
93  Reparent = ParentChange,
94 #endif
95  ThreadChange = 22, // object has changed threads
96  WindowActivate = 24, // window was activated
97  WindowDeactivate = 25, // window was deactivated
98  ShowToParent = 26, // widget is shown to parent
99  HideToParent = 27, // widget is hidden to parent
100  Wheel = 31, // wheel event
101  WindowTitleChange = 33, // window title changed
102  WindowIconChange = 34, // icon changed
103  ApplicationWindowIconChange = 35, // application icon changed
104  ApplicationFontChange = 36, // application font changed
105  ApplicationLayoutDirectionChange = 37, // application layout direction changed
106  ApplicationPaletteChange = 38, // application palette changed
107  PaletteChange = 39, // widget palette changed
108  Clipboard = 40, // internal clipboard event
109  Speech = 42, // reserved for speech input
110  MetaCall = 43, // meta call event
111  SockAct = 50, // socket activation
112  WinEventAct = 132, // win event activation
113  DeferredDelete = 52, // deferred delete event
114  DragEnter = 60, // drag moves into widget
115  DragMove = 61, // drag moves in widget
116  DragLeave = 62, // drag leaves or is cancelled
117  Drop = 63, // actual drop
118  DragResponse = 64, // drag accepted/rejected
119  ChildAdded = 68, // new child widget
120  ChildPolished = 69, // polished child widget
121 #ifdef QT3_SUPPORT
122  ChildInsertedRequest = 67, // send ChildInserted compatibility events to receiver
123  ChildInserted = 70, // compatibility child inserted
124  LayoutHint = 72, // compatibility relayout request
125 #endif
126  ChildRemoved = 71, // deleted child widget
127  ShowWindowRequest = 73, // widget's window should be mapped
128  PolishRequest = 74, // widget should be polished
129  Polish = 75, // widget is polished
130  LayoutRequest = 76, // widget should be relayouted
131  UpdateRequest = 77, // widget should be repainted
132  UpdateLater = 78, // request update() later
133 
134  EmbeddingControl = 79, // ActiveX embedding
135  ActivateControl = 80, // ActiveX activation
136  DeactivateControl = 81, // ActiveX deactivation
137  ContextMenu = 82, // context popup menu
138  InputMethod = 83, // input method
139  AccessibilityPrepare = 86, // accessibility information is requested
140  TabletMove = 87, // Wacom tablet event
141  LocaleChange = 88, // the system locale changed
142  LanguageChange = 89, // the application language changed
143  LayoutDirectionChange = 90, // the layout direction changed
144  Style = 91, // internal style event
145  TabletPress = 92, // tablet press
146  TabletRelease = 93, // tablet release
147  OkRequest = 94, // CE (Ok) button pressed
148  HelpRequest = 95, // CE (?) button pressed
149 
150  IconDrag = 96, // proxy icon dragged
151 
152  FontChange = 97, // font has changed
153  EnabledChange = 98, // enabled state has changed
154  ActivationChange = 99, // window activation has changed
155  StyleChange = 100, // style has changed
156  IconTextChange = 101, // icon text has changed
157  ModifiedChange = 102, // modified state has changed
158  MouseTrackingChange = 109, // mouse tracking state has changed
159 
160  WindowBlocked = 103, // window is about to be blocked modally
161  WindowUnblocked = 104, // windows modal blocking has ended
162  WindowStateChange = 105,
163 
164  ToolTip = 110,
165  WhatsThis = 111,
166  StatusTip = 112,
167 
168  ActionChanged = 113,
169  ActionAdded = 114,
170  ActionRemoved = 115,
171 
172  FileOpen = 116, // file open request
173 
174  Shortcut = 117, // shortcut triggered
175  ShortcutOverride = 51, // shortcut override request
176 
177 #ifdef QT3_SUPPORT
178  Accel = 30, // accelerator event
179  AccelAvailable = 32, // accelerator available event
180  AccelOverride = ShortcutOverride, // accelerator override event
181 #endif
182 
183  WhatsThisClicked = 118,
184 
185 #ifdef QT3_SUPPORT
186  CaptionChange = WindowTitleChange,
187  IconChange = WindowIconChange,
188 #endif
189  ToolBarChange = 120, // toolbar visibility toggled
190 
191  ApplicationActivate = 121, // application has been changed to active
193  ApplicationDeactivate = 122, // application has been changed to inactive
195 
196  QueryWhatsThis = 123, // query what's this widget help
197  EnterWhatsThisMode = 124,
198  LeaveWhatsThisMode = 125,
199 
200  ZOrderChange = 126, // child widget has had its z-order changed
201 
202  HoverEnter = 127, // mouse cursor enters a hover widget
203  HoverLeave = 128, // mouse cursor leaves a hover widget
204  HoverMove = 129, // mouse cursor move inside a hover widget
205 
206  AccessibilityHelp = 119, // accessibility help text request
207  AccessibilityDescription = 130, // accessibility description text request
208 
209  // last event id used = 132
210 
211 #ifdef QT_KEYPAD_NAVIGATION
212  EnterEditFocus = 150, // enter edit mode in keypad navigation (Defined only with QT_KEYPAD_NAVIGATION)
213  LeaveEditFocus = 151, // leave edit mode in keypad navigation (Defined only with QT_KEYPAD_NAVIGATION)
214 #endif
215  AcceptDropsChange = 152,
216 
217  MenubarUpdated = 153, // Support event for Q3MainWindow, which needs to
218  // knwow when QMenubar is updated.
219 
220  ZeroTimerEvent = 154, // Used for Windows Zero timer events
221 
222  GraphicsSceneMouseMove = 155, // GraphicsView
230  GraphicsSceneHelp = 163,
232  GraphicsSceneDragMove = 165,
234  GraphicsSceneDrop = 167,
235  GraphicsSceneWheel = 168,
236 
237  KeyboardLayoutChange = 169, // keyboard layout changed
238 
239  DynamicPropertyChange = 170, // A dynamic property was changed through setProperty/property
240 
241  TabletEnterProximity = 171,
242  TabletLeaveProximity = 172,
243 
248 
249  MacSizeChange = 177, // when the Qt::WA_Mac{Normal,Small,Mini}Size changes
250 
251  ContentsRectChange = 178, // sent by QWidget::setContentsMargins (internal)
252 
253  MacGLWindowChange = 179, // Internal! the window of the GLWidget has changed
254 
255  FutureCallOut = 180,
256 
257  GraphicsSceneResize = 181,
258  GraphicsSceneMove = 182,
259 
260  CursorChange = 183,
261  ToolTipChange = 184,
262 
263  NetworkReplyUpdated = 185, // Internal for QNetworkReply
264 
265  GrabMouse = 186,
266  UngrabMouse = 187,
267  GrabKeyboard = 188,
268  UngrabKeyboard = 189,
269  MacGLClearDrawable = 191, // Internal Cocoa, the window has changed, so we must clear
270 
271  StateMachineSignal = 192,
272  StateMachineWrapped = 193,
273 
274  TouchBegin = 194,
275  TouchUpdate = 195,
276  TouchEnd = 196,
277 
278 #ifndef QT_NO_GESTURES
279  NativeGesture = 197, // Internal for platform gesture support
280 #endif
283 
284  UpdateSoftKeys = 201, // Internal for compressing soft key updates
285 
286  WinIdChange = 203,
287 #ifndef QT_NO_GESTURES
288  Gesture = 198,
289  GestureOverride = 202,
290 #endif
291 
292  PlatformPanel = 212,
293 
294  // 512 reserved for Qt Jambi's MetaCall event
295  // 513 reserved for Qt Jambi's DeleteOnMainThread event
296 
297  User = 1000, // first user event id
298  MaxUser = 65535 // last user event id
299  };
The ParentChange element allows you to reparent an Item in a state change.
The Timer item triggers a handler at a specified interval.

Constructors and Destructors

◆ QEvent()

QEvent::QEvent ( Type  type)

Contructs an event object of type type.

Definition at line 289 of file qcoreevent.cpp.

Referenced by QFileOpenEvent::QFileOpenEvent(), QPaintEvent::QPaintEvent(), QChildEvent::~QChildEvent(), and QWindowStateChangeEvent::~QWindowStateChangeEvent().

290  : d(0), t(type), posted(false), spont(false), m_accept(true)
291 {}
ushort t
Definition: qcoreevent.h:316
ushort spont
Definition: qcoreevent.h:320
ushort m_accept
Definition: qcoreevent.h:321
ushort posted
Definition: qcoreevent.h:319
QEventPrivate * d
Definition: qcoreevent.h:315
Type type() const
Returns the event type.
Definition: qcoreevent.h:303

◆ ~QEvent()

QEvent::~QEvent ( )
virtual

Destroys the event.

If it was posted , it will be removed from the list of events to be posted.

Definition at line 299 of file qcoreevent.cpp.

300 {
303 }
ushort posted
Definition: qcoreevent.h:319
static QCoreApplication * instance()
Returns a pointer to the application&#39;s QCoreApplication (or QApplication) instance.
static void removePostedEvent(QEvent *)
Removes event from the queue of posted events, and emits a warning message if appropriate.

Functions

◆ accept()

void QEvent::accept ( )
inline

Sets the accept flag of the event object, the equivalent of calling setAccepted(true).

Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget.

See also
ignore()

Definition at line 309 of file qcoreevent.h.

Referenced by QDragMoveEvent::accept(), QAlphaWidget::closeEvent(), QDialog::closeEvent(), QMdiSubWindow::closeEvent(), QRollEffect::closeEvent(), QLabel::contextMenuEvent(), QGraphicsScene::contextMenuEvent(), QWorkspaceTitleBar::contextMenuEvent(), QOleDropTarget::Drop(), QColorWell::dropEvent(), QColorShowLabel::dropEvent(), QWindowsVistaStyle::event(), QMenuBar::event(), QMenu::event(), QMainWindow::event(), QApplication::event(), QWidget::event(), QMainWindowTabBar::event(), QCalendarTextNavigator::eventFilter(), QIconModeViewBase::filterDropEvent(), QTextBrowser::keyPressEvent(), QAbstractScrollArea::keyPressEvent(), QTextControlPrivate::keyPressEvent(), QMenuBar::keyPressEvent(), QMenu::keyPressEvent(), QPlainTextEdit::keyPressEvent(), QComboBox::keyPressEvent(), QGraphicsScene::keyPressEvent(), QTextEdit::keyPressEvent(), QFileDialogLineEdit::keyPressEvent(), QFileDialogListView::keyPressEvent(), QFileDialogTreeView::keyPressEvent(), QGraphicsScene::keyReleaseEvent(), QTextEdit::keyReleaseEvent(), QDropEvent::mimeData(), QWorkspaceTitleBar::mouseDoubleClickEvent(), QDial::mouseMoveEvent(), QSlider::mouseMoveEvent(), QAbstractButton::mouseMoveEvent(), QGraphicsScene::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QDial::mousePressEvent(), QSlider::mousePressEvent(), QAbstractButton::mousePressEvent(), QDial::mouseReleaseEvent(), QSlider::mouseReleaseEvent(), QAbstractButton::mouseReleaseEvent(), QWorkspaceTitleBar::mouseReleaseEvent(), QGraphicsScene::mouseReleaseEvent(), QShortcutMap::nextState(), QApplication::notify(), QTextControl::processEvent(), QLineControl::processEvent(), QGraphicsScenePrivate::touchEventHandler(), QShortcutMap::tryShortcutEvent(), QAbstractSlider::wheelEvent(), QComboBox::wheelEvent(), and QGraphicsScene::wheelEvent().

309 { m_accept = true; }
ushort m_accept
Definition: qcoreevent.h:321

◆ ignore()

void QEvent::ignore ( )
inline

Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).

Clearing the accept parameter indicates that the event receiver does not want the event. Unwanted events might be propagated to the parent widget.

See also
accept()

Definition at line 310 of file qcoreevent.h.

Referenced by QMdiSubWindow::changeEvent(), QDialog::closeEvent(), QMdiSubWindow::closeEvent(), QMessageBox::closeEvent(), QAbstractScrollArea::contextMenuEvent(), QMdiSubWindow::contextMenuEvent(), QLabel::contextMenuEvent(), QGraphicsScene::contextMenuEvent(), QWorkspaceTitleBar::contextMenuEvent(), QTextControlPrivate::dragEnterEvent(), QTextControlPrivate::dragMoveEvent(), QLineEdit::dropEvent(), QColorWell::dropEvent(), QColorShowLabel::dropEvent(), QAbstractScrollArea::event(), QTabBar::event(), QApplication::event(), QWidget::event(), QGraphicsScene::focusInEvent(), QKeyEvent::hasExtendedInfo(), QDragMoveEvent::ignore(), QTextControlPrivate::inputMethodEvent(), QLineEdit::inputMethodEvent(), QComboBox::inputMethodEvent(), QDeclarativeTextInput::inputMethodEvent(), QTextBrowser::keyPressEvent(), QDialog::keyPressEvent(), QAbstractScrollArea::keyPressEvent(), QMdiSubWindow::keyPressEvent(), QTextControlPrivate::keyPressEvent(), QMenuBar::keyPressEvent(), QAbstractButton::keyPressEvent(), QAbstractSlider::keyPressEvent(), QWellArray::keyPressEvent(), QMenu::keyPressEvent(), QTabWidget::keyPressEvent(), QPlainTextEdit::keyPressEvent(), QComboBox::keyPressEvent(), QDeclarativeTextInput::keyPressEvent(), QGraphicsScene::keyPressEvent(), QTextEdit::keyPressEvent(), QAbstractItemView::keyPressEvent(), QAbstractButton::keyReleaseEvent(), QGraphicsScene::keyReleaseEvent(), QTextEdit::keyReleaseEvent(), QAbstractScrollArea::mouseDoubleClickEvent(), QMdiSubWindow::mouseDoubleClickEvent(), QTextControlPrivate::mouseDoubleClickEvent(), QWorkspaceTitleBar::mouseDoubleClickEvent(), QMdi::ControlLabel::mouseDoubleClickEvent(), QDial::mouseMoveEvent(), QSlider::mouseMoveEvent(), QAbstractScrollArea::mouseMoveEvent(), QAbstractButton::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QDial::mousePressEvent(), QSlider::mousePressEvent(), QAbstractScrollArea::mousePressEvent(), QMdiSubWindow::mousePressEvent(), QTextControlPrivate::mousePressEvent(), QAbstractButton::mousePressEvent(), QWorkspaceTitleBar::mousePressEvent(), QMdi::ControlLabel::mousePressEvent(), QGraphicsScenePrivate::mousePressEventHandler(), QDial::mouseReleaseEvent(), QSlider::mouseReleaseEvent(), QAbstractScrollArea::mouseReleaseEvent(), QMdiSubWindow::mouseReleaseEvent(), QAbstractButton::mouseReleaseEvent(), QWorkspaceTitleBar::mouseReleaseEvent(), QGraphicsScene::mouseReleaseEvent(), QMdi::ControlLabel::mouseReleaseEvent(), QApplication::notify(), QTextControl::processEvent(), QDropEvent::QDropEvent(), QIconDragEvent::QIconDragEvent(), qt_mac_menu_event(), QMdiArea::resizeEvent(), QLabelPrivate::sendControlEvent(), QRubberBand::showEvent(), QShortcutMap::tryShortcutEvent(), and QAbstractSlider::wheelEvent().

310 { m_accept = false; }
ushort m_accept
Definition: qcoreevent.h:321

◆ isAccepted()

bool QEvent::isAccepted ( ) const
inline

Definition at line 307 of file qcoreevent.h.

Referenced by _q_hoverFromMouseEvent(), QApplicationPrivate::canQuit(), QGraphicsWidget::close(), QWidgetPrivate::close_helper(), QGraphicsView::contextMenuEvent(), QGraphicsScene::contextMenuEvent(), QGraphicsProxyWidget::dragEnterEvent(), QGraphicsView::dragEnterEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsProxyWidget::dragMoveEvent(), QGraphicsView::dragMoveEvent(), QGraphicsScene::dragMoveEvent(), QOleDropTarget::DragOver(), QOleDropTarget::Drop(), QGraphicsView::dropEvent(), QAbstractItemViewPrivate::dropOn(), QListModeViewBase::dropOn(), QGraphicsProxyWidget::event(), QStyleSheetStyle::event(), QPlainTextEdit::event(), QGraphicsView::event(), QGraphicsScene::event(), QTextEdit::event(), QApplication::event(), QWidget::event(), QCompleter::eventFilter(), QWhatsThisPrivate::eventFilter(), QGraphicsView::focusInEvent(), QAbstractItemView::focusNextPrevChild(), QApplicationPrivate::globalAppleEventProcessor(), QApplicationPrivate::globalEventProcessor(), handle_xdnd_position(), QGraphicsScene::helpEvent(), QDeclarativeItem::inputMethodEvent(), QDeclarativeTextInput::inputMethodEvent(), QDeclarativeKeysAttached::inputMethodEvent(), QGestureEvent::isAccepted(), QKeyMapperPrivate::isADeadKey(), QDeclarativeKeyNavigationAttached::keyPressed(), QDeclarativeKeysAttached::keyPressed(), QDeclarativeItem::keyPressEvent(), QLineEdit::keyPressEvent(), QDeclarativeGridView::keyPressEvent(), QPlainTextEdit::keyPressEvent(), QGraphicsView::keyPressEvent(), QDeclarativeListView::keyPressEvent(), QDeclarativeTextInput::keyPressEvent(), QGraphicsScene::keyPressEvent(), QDeclarativeTextEdit::keyPressEvent(), QTextEdit::keyPressEvent(), QDeclarativeKeyNavigationAttached::keyReleased(), QDeclarativeKeysAttached::keyReleased(), QDeclarativeItem::keyReleaseEvent(), QGraphicsView::keyReleaseEvent(), QGraphicsScene::keyReleaseEvent(), QDeclarativeTextEdit::keyReleaseEvent(), QX11Data::motifdndHandle(), QDeclarativeTextEdit::mouseDoubleClickEvent(), QDeclarativeTextEdit::mouseMoveEvent(), QGraphicsViewPrivate::mouseMoveEventHandler(), QDeclarativeText::mousePressEvent(), QGraphicsView::mousePressEvent(), QDeclarativeTextEdit::mousePressEvent(), QGraphicsTextItem::mousePressEvent(), QDeclarativeText::mouseReleaseEvent(), QGraphicsView::mouseReleaseEvent(), QDeclarativeTextInput::mouseReleaseEvent(), QDeclarativeTextEdit::mouseReleaseEvent(), QApplication::notify(), QTextControl::processEvent(), qt_keyrelease_scanner(), qt_mac_menu_event(), qtKey2CocoaKey(), QGraphicsProxyWidgetPrivate::removeSubFocusHelper(), QDeclarativeItem::sceneEvent(), QOleDropTarget::sendDragEnterEvent(), QGraphicsScenePrivate::sendTouchBeginEvent(), QGraphicsProxyWidgetPrivate::sendWidgetKeyEvent(), QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(), QETWidget::translateMouseEvent(), QETWidget::translateXinputEvent(), QShortcutMap::tryShortcutEvent(), QGraphicsView::viewportEvent(), QGraphicsView::wheelEvent(), QGraphicsScene::wheelEvent(), and QX11Data::xdndHandleDrop().

307 { return m_accept; }
ushort m_accept
Definition: qcoreevent.h:321

◆ registerEventType()

int QEvent::registerEventType ( int  hint = -1)
static

Registers and returns a custom event type.

Since
4.4
Note
This class or function is threadsafe.

The hint provided will be used if it is available, otherwise it will return a value between QEvent::User and QEvent::MaxUser that has not yet been registered. The hint is ignored if its value is not between QEvent::User and QEvent::MaxUser.

Definition at line 398 of file qcoreevent.cpp.

399 {
400  QEventUserEventRegistration *userEventRegistration
401  = userEventRegistrationHelper();
402  if (!userEventRegistration)
403  return -1;
404 
405  QMutexLocker locker(&userEventRegistration->mutex);
406 
407  // if the type hint hasn't been registered yet, take it
408  if (hint >= QEvent::User && hint <= QEvent::MaxUser && !userEventRegistration->set.contains(hint)) {
409  userEventRegistration->set.insert(hint);
410  return hint;
411  }
412 
413  // find a free event type, starting at MaxUser and decreasing
414  int id = QEvent::MaxUser;
415  while (userEventRegistration->set.contains(id) && id >= QEvent::User)
416  --id;
417  if (id >= QEvent::User) {
418  userEventRegistration->set.insert(id);
419  return id;
420  }
421  return -1;
422 }
bool contains(const T &value) const
Definition: qset.h:91
const_iterator insert(const T &value)
Definition: qset.h:179
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
Definition: qmutex.h:101

◆ setAccepted()

void QEvent::setAccepted ( bool  accepted)
inline

◆ spontaneous()

bool QEvent::spontaneous ( ) const
inline

Returns true if the event originated outside the application (a system event); otherwise returns false.

The return value of this function is not defined for paint events.

Definition at line 304 of file qcoreevent.h.

Referenced by QWidgetResizeHandler::eventFilter(), QGraphicsView::mouseDoubleClickEvent(), QGraphicsViewPrivate::mouseMoveEventHandler(), QGraphicsView::mousePressEvent(), QGraphicsView::mouseReleaseEvent(), QApplication::notify(), QDeclarativeFlickable::sendMouseEvent(), QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(), QDialog::showEvent(), and QGraphicsView::viewportEvent().

304 { return spont; }
ushort spont
Definition: qcoreevent.h:320

◆ type()

QEvent::Type QEvent::type ( ) const
inline

Returns the event type.

Definition at line 303 of file qcoreevent.h.

Referenced by QStateMachinePrivate::_q_process(), QToolButton::actionEvent(), QMenuBar::actionEvent(), QToolBar::actionEvent(), QMenu::actionEvent(), QChildEvent::added(), QTextControlPrivate::anchorForCursor(), QSignalTransitionPrivate::callOnTransition(), QDeclarativeFlickablePrivate::captureDelayedPress(), QWSEmbedWidget::changeEvent(), QErrorMessage::changeEvent(), QExpandingLineEdit::changeEvent(), QRubberBand::changeEvent(), QAxWidget::changeEvent(), QGroupBox::changeEvent(), QToolBox::changeEvent(), QWorkspace::changeEvent(), QFontDialog::changeEvent(), QDockWidget::changeEvent(), QMdiSubWindow::changeEvent(), QToolButton::changeEvent(), QColorDialog::changeEvent(), QSplitter::changeEvent(), QProgressDialog::changeEvent(), QFrame::changeEvent(), QMenuBar::changeEvent(), QLabel::changeEvent(), QAbstractButton::changeEvent(), QToolBar::changeEvent(), QAbstractSpinBox::changeEvent(), QDialogButtonBox::changeEvent(), QAbstractSlider::changeEvent(), QMenu::changeEvent(), QTabWidget::changeEvent(), QTabBar::changeEvent(), QGraphicsWidget::changeEvent(), QLineEdit::changeEvent(), QComboBoxPrivateContainer::changeEvent(), QComboBox::changeEvent(), QPlainTextEdit::changeEvent(), QFileDialog::changeEvent(), QTextEdit::changeEvent(), QMessageBox::changeEvent(), QWidget::changeEvent(), QWorkspaceChild::changeEvent(), QGroupBox::childEvent(), QSplitter::childEvent(), QMdiSubWindow::childEvent(), QMdiArea::childEvent(), QLayout::childEvent(), QWorkspaceChild::childEvent(), clipboardData(), cloneEvent(), QCoreApplication::compressEvent(), QApplication::compressEvent(), QAbstractItemViewPrivate::contiguousSelectionCommand(), QDBusConnectionPrivate::customEvent(), QStyledItemDelegate::editorEvent(), QItemDelegate::editorEvent(), QRadioButton::event(), QScrollBar::event(), QWidgetAction::event(), QAnimationGroup::event(), QScriptDebuggerFrontendPrivate::event(), QX11EmbedWidget::event(), QSocketNotifier::event(), QCheckBox::event(), QGraphicsProxyWidget::event(), QWinEventNotifier::event(), QScriptDebuggerBackendPrivate::event(), QSplashScreen::event(), QFutureWatcherBase::event(), QScrollArea::event(), QScriptDebuggerCodeView::event(), QNetworkReplyImpl::event(), QWindowsVistaStyle::event(), QSoftKeyManager::event(), QGraphicsSceneBspTreeIndex::event(), QGroupBox::event(), QPushButton::event(), QFontComboBox::event(), QMDIControl::event(), QShortcut::event(), QSlider::event(), QEventDispatcherWin32::event(), QAbstractScrollArea::event(), QMotifStyle::event(), QStatusBar::event(), QWorkspace::event(), QState::event(), QSpinBox::event(), QClipboard::event(), QDnotifySignalThread::event(), QDialog::event(), QDeclarativeSystemPalette::event(), QToolButton::event(), QDeclarativeWorkerScript::event(), QDeclarativeListModelWorkerAgent::event(), QSystemTrayIcon::event(), QMdiSubWindow::event(), QProgressBar::event(), QDeclarativePixmapReply::event(), QSplitter::event(), QX11EmbedContainer::event(), QObject::event(), QDockWidget::event(), QMacStyle::event(), QAbstractSpinBox::event(), QFrame::event(), QAxHostWidget::event(), QScriptEngineDebuggerBackendPrivate::event(), QDeclarativePixmapReaderThreadObject::event(), QSidebar::event(), QAbstractButton::event(), QAbstractSlider::event(), QLabel::event(), QScriptEngineDebuggerFrontendPrivate::event(), QMenuBar::event(), QToolBar::event(), QFileSystemModel::event(), QCalendarWidget::event(), QMdiArea::event(), QDialogButtonBox::event(), QTabWidget::event(), QDateTimeEdit::event(), QDeclarativeXmlQueryThreadObject::event(), QCalendarPopup::event(), QSystemTrayIconSys::event(), QDeclarativeItem::event(), QStateMachine::event(), QDeclarativePathView::event(), QSplitterHandle::event(), QMenu::event(), QDeclarativeWorkerScriptEnginePrivate::event(), QWizard::event(), QTabBar::event(), QHeaderView::event(), QCoreApplication::event(), QDeclarativeGridView::event(), QMainWindow::event(), QGraphicsWidget::event(), QAction::event(), QComboBox::event(), QPlainTextEdit::event(), QLineEdit::event(), QGraphicsView::event(), QDeclarativeListView::event(), QDeclarativeTextInput::event(), QGraphicsScene::event(), QWorkspaceTitleBar::event(), QDeclarativeTextEdit::event(), QTextEdit::event(), QDeclarativePinchArea::event(), QSettings::event(), QMessageBox::event(), QAbstractItemView::event(), QApplication::event(), QTreeWidget::event(), QMdi::ControlLabel::event(), QMdi::ControllerWidget::event(), QWidget::event(), QCalendarView::event(), QReadNotifier::event(), QWriteNotifier::event(), QExceptionNotifier::event(), QMainWindowTabBar::event(), QUIKitSoftwareInputHandler::eventFilter(), QWSEmbedWidget::eventFilter(), QFocusFrame::eventFilter(), QDeclarativeApplication::eventFilter(), QSizeGrip::eventFilter(), QBBInputContext::eventFilter(), QAlphaWidget::eventFilter(), QX11EmbedWidget::eventFilter(), QmlJSDebugger::QDeclarativeViewInspector::eventFilter(), QGraphicsProxyWidget::eventFilter(), QCalendarTextNavigator::eventFilter(), QScrollArea::eventFilter(), QMeeGoGraphicsSystemSwitchHandler::eventFilter(), QDeclarativeLoader::eventFilter(), QWindowsStyle::eventFilter(), QWidgetResizeHandler::eventFilter(), QStyledItemDelegate::eventFilter(), QPlastiqueStyle::eventFilter(), QDeclarativeView::eventFilter(), QWorkspace::eventFilter(), QDeclarativeSystemPalette::eventFilter(), QMotifStyle::eventFilter(), QItemDelegate::eventFilter(), QMdiSubWindow::eventFilter(), QX11EmbedContainer::eventFilter(), QFontDialog::eventFilter(), QAxHostWidget::eventFilter(), QTipLabel::eventFilter(), QVistaHelper::eventFilter(), QmlJSDebugger::AbstractViewInspector::eventFilter(), QMenuBar::eventFilter(), QCompleter::eventFilter(), QCalendarWidget::eventFilter(), QMdiArea::eventFilter(), QScriptDebugger::eventFilter(), QScriptDebuggerLocalsItemDelegate::eventFilter(), QMacStylePrivate::eventFilter(), QScriptBreakpointsItemDelegate::eventFilter(), QComboBoxPrivateContainer::eventFilter(), QGraphicsScene::eventFilter(), QGtkStyleFilter::eventFilter(), QAxServerBase::eventFilter(), QWhatsThisPrivate::eventFilter(), QWorkspaceChild::eventFilter(), QEventTransition::eventTest(), QSignalTransition::eventTest(), QKeyEventTransition::eventTest(), QMouseEventTransition::eventTest(), QBasicKeyEventTransition::eventTest(), QBasicMouseEventTransition::eventTest(), QAbstractItemViewPrivate::extendedSelectionCommand(), QScriptEdit::extraAreaEvent(), QScriptEdit::extraAreaMouseEvent(), QGestureEvent::gesture(), QFocusEvent::gotFocus(), QStateMachinePrivate::handleFilteredEvent(), QBBInputContext::hasPhysicalKeyboard(), QAbstractItemDelegate::helpEvent(), isProcessBeingDebugged(), QFocusEvent::lostFocus(), QVistaHelper::mouseEvent(), QMenuPrivate::mouseEventTaken(), QWSInputContext::mouseHandler(), QMacInputContext::mouseHandler(), QWinInputContext::mouseHandler(), QInputContext::mouseHandler(), QXIMInputContext::mouseHandler(), QTabBar::mousePressEvent(), QAbstractItemViewPrivate::multiSelectionCommand(), QShortcutMap::nextState(), QDockWidgetPrivate::nonClientAreaMouseEvent(), QApplication::notify(), QApplicationPrivate::notify_helper(), operator<<(), QChildEvent::polished(), QCoreApplication::postEvent(), QTextControl::processEvent(), QLineControl::processEvent(), QLineControl::processMouseEvent(), qStoreColors(), qt_keyrelease_scanner(), QPanGestureRecognizer::recognize(), QWinNativePanGestureRecognizer::recognize(), QMacSwipeGestureRecognizer::recognize(), QPinchGestureRecognizer::recognize(), QMacPinchGestureRecognizer::recognize(), QSwipeGestureRecognizer::recognize(), QTapGestureRecognizer::recognize(), QTapAndHoldGestureRecognizer::recognize(), QGraphicsItemPrivate::remapItemPos(), QChildEvent::removed(), QCoreApplicationPrivate::removePostedEvent(), QCoreApplication::removePostedEvents(), QCoreApplicationPrivate::removePostedTimerEvent(), QMacPinchGestureRecognizer::reset(), QDeclarativeFocusPanel::sceneEvent(), QDeclarativeGestureArea::sceneEvent(), QDeclarativeItem::sceneEvent(), QDeclarativeMouseArea::sceneEvent(), QDeclarativeFlickable::sceneEvent(), QDeclarativeTextInput::sceneEvent(), QDeclarativePinchArea::sceneEvent(), QGraphicsItem::sceneEvent(), QGraphicsTextItem::sceneEvent(), QDeclarativePathView::sceneEventFilter(), QDeclarativeFlickable::sceneEventFilter(), QDeclarativeMouseArea::sceneEventFilter(), QDeclarativePinchArea::sceneEventFilter(), QAbstractItemView::selectionCommand(), QDeclarativePathView::sendMouseEvent(), QDeclarativeMouseArea::sendMouseEvent(), QDeclarativeFlickable::sendMouseEvent(), QDeclarativePinchArea::sendMouseEvent(), QApplicationPrivate::sendMouseEvent(), QLineEditPrivate::sendMouseEventToInputContext(), QCoreApplicationPrivate::sendPostedEvents(), QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(), QPrintDialogPrivate::setupOptions(), QAbstractItemViewPrivate::shouldForwardEvent(), showToolTip(), QGraphicsViewPrivate::storeDragDropEvent(), QTornOffMenu::syncWithMenu(), QAbstractScrollArea::viewportEvent(), QMdiArea::viewportEvent(), QHeaderView::viewportEvent(), QTreeView::viewportEvent(), QGraphicsView::viewportEvent(), QAbstractItemView::viewportEvent(), QGraphicsLayout::widgetEvent(), QLayout::widgetEvent(), QGraphicsWidget::windowFrameEvent(), QChildEvent::~QChildEvent(), and QMouseEvent::~QMouseEvent().

303 { return static_cast<Type>(t); }
ushort t
Definition: qcoreevent.h:316
Type
This enum type defines the valid event types in Qt.
Definition: qcoreevent.h:62

Friends and Related Functions

◆ Q3AccelManager

friend class Q3AccelManager
friend

Definition at line 329 of file qcoreevent.h.

◆ QApplication

friend class QApplication
friend

Definition at line 327 of file qcoreevent.h.

◆ QApplicationPrivate

friend class QApplicationPrivate
friend

Definition at line 328 of file qcoreevent.h.

◆ QCoreApplication

friend class QCoreApplication
friend

Definition at line 324 of file qcoreevent.h.

◆ QCoreApplicationPrivate

Definition at line 325 of file qcoreevent.h.

◆ QETWidget

friend class QETWidget
friend

Definition at line 331 of file qcoreevent.h.

◆ QGestureManager

friend class QGestureManager
friend

Definition at line 337 of file qcoreevent.h.

◆ QGraphicsScene

friend class QGraphicsScene
friend

Definition at line 334 of file qcoreevent.h.

◆ QGraphicsScenePrivate

Definition at line 335 of file qcoreevent.h.

◆ QGraphicsView

friend class QGraphicsView
friend

Definition at line 332 of file qcoreevent.h.

◆ QGraphicsViewPrivate

friend class QGraphicsViewPrivate
friend

Definition at line 333 of file qcoreevent.h.

◆ QShortcutMap

friend class QShortcutMap
friend

Definition at line 330 of file qcoreevent.h.

◆ QThreadData

friend class QThreadData
friend

Definition at line 326 of file qcoreevent.h.

Properties

◆ d

QEventPrivate* QEvent::d
protected

Definition at line 315 of file qcoreevent.h.

Referenced by QGraphicsSceneDragDropEvent::acceptProposedAction(), QGraphicsSceneMouseEvent::button(), QGraphicsSceneMouseEvent::buttonDownPos(), QGraphicsSceneMouseEvent::buttonDownScenePos(), QGraphicsSceneMouseEvent::buttonDownScreenPos(), QGraphicsSceneMouseEvent::buttons(), QGraphicsSceneWheelEvent::buttons(), QGraphicsSceneDragDropEvent::buttons(), QGestureEvent::d_func(), QWheelEvent::delta(), QGraphicsSceneWheelEvent::delta(), QTouchEventTouchPointPrivate::detach(), QGraphicsSceneDragDropEvent::dropAction(), QGraphicsScene::event(), QGestureEvent::gesture(), QMouseEvent::hasExtendedInfo(), QKeyEvent::hasExtendedInfo(), QWindowStateChangeEvent::isOverride(), QGraphicsSceneMouseEvent::lastPos(), QGraphicsSceneHoverEvent::lastPos(), QGraphicsSceneMouseEvent::lastScenePos(), QGraphicsSceneHoverEvent::lastScenePos(), QGraphicsSceneMouseEvent::lastScreenPos(), QGraphicsSceneHoverEvent::lastScreenPos(), QGraphicsSceneDragDropEvent::mimeData(), QGraphicsSceneMouseEvent::modifiers(), QGraphicsSceneWheelEvent::modifiers(), QGraphicsSceneContextMenuEvent::modifiers(), QGraphicsSceneHoverEvent::modifiers(), QGraphicsSceneDragDropEvent::modifiers(), QKeyEvent::nativeModifiers(), QKeyEvent::nativeScanCode(), QKeyEvent::nativeVirtualKey(), QGraphicsSceneMoveEvent::newPos(), QGraphicsSceneResizeEvent::newSize(), QGraphicsSceneMoveEvent::oldPos(), QGraphicsSceneResizeEvent::oldSize(), QFileOpenEvent::openFile(), QGraphicsSceneWheelEvent::orientation(), QGraphicsSceneMouseEvent::pos(), QGraphicsSceneWheelEvent::pos(), QGraphicsSceneContextMenuEvent::pos(), QGraphicsSceneHoverEvent::pos(), QGraphicsSceneDragDropEvent::pos(), QGraphicsSceneDragDropEvent::possibleActions(), QGraphicsSceneDragDropEvent::proposedAction(), QClipboardEvent::QClipboardEvent(), QFileOpenEvent::QFileOpenEvent(), QGestureEvent::QGestureEvent(), QKeyEventEx::QKeyEventEx(), QMouseEventEx::QMouseEventEx(), QWindowStateChangeEvent::QWindowStateChangeEvent(), QGraphicsSceneContextMenuEvent::reason(), QGraphicsSceneMouseEvent::scenePos(), QGraphicsSceneWheelEvent::scenePos(), QGraphicsSceneContextMenuEvent::scenePos(), QGraphicsSceneHoverEvent::scenePos(), QGraphicsSceneHelpEvent::scenePos(), QGraphicsSceneDragDropEvent::scenePos(), QGraphicsSceneMouseEvent::screenPos(), QGraphicsSceneWheelEvent::screenPos(), QGraphicsSceneContextMenuEvent::screenPos(), QGraphicsSceneHoverEvent::screenPos(), QGraphicsSceneHelpEvent::screenPos(), QGraphicsSceneDragDropEvent::screenPos(), QCoreApplicationPrivate::sendPostedEvents(), QGraphicsSceneMouseEvent::setButton(), QGraphicsSceneMouseEvent::setButtonDownPos(), QGraphicsSceneMouseEvent::setButtonDownScenePos(), QGraphicsSceneMouseEvent::setButtonDownScreenPos(), QGraphicsSceneMouseEvent::setButtons(), QGraphicsSceneWheelEvent::setButtons(), QGraphicsSceneDragDropEvent::setButtons(), QGraphicsSceneWheelEvent::setDelta(), QGraphicsSceneDragDropEvent::setDropAction(), QGraphicsSceneMouseEvent::setLastPos(), QGraphicsSceneHoverEvent::setLastPos(), QGraphicsSceneMouseEvent::setLastScenePos(), QGraphicsSceneHoverEvent::setLastScenePos(), QGraphicsSceneMouseEvent::setLastScreenPos(), QGraphicsSceneHoverEvent::setLastScreenPos(), QGraphicsSceneDragDropEvent::setMimeData(), QGraphicsSceneMouseEvent::setModifiers(), QGraphicsSceneWheelEvent::setModifiers(), QGraphicsSceneContextMenuEvent::setModifiers(), QGraphicsSceneHoverEvent::setModifiers(), QGraphicsSceneDragDropEvent::setModifiers(), QGraphicsSceneMoveEvent::setNewPos(), QGraphicsSceneResizeEvent::setNewSize(), QGraphicsSceneMoveEvent::setOldPos(), QGraphicsSceneResizeEvent::setOldSize(), QGraphicsSceneWheelEvent::setOrientation(), QGraphicsSceneMouseEvent::setPos(), QGraphicsSceneWheelEvent::setPos(), QGraphicsSceneContextMenuEvent::setPos(), QGraphicsSceneHoverEvent::setPos(), QGraphicsSceneDragDropEvent::setPos(), QGraphicsSceneDragDropEvent::setPossibleActions(), QGraphicsSceneDragDropEvent::setProposedAction(), QGraphicsSceneContextMenuEvent::setReason(), QGraphicsSceneMouseEvent::setScenePos(), QGraphicsSceneWheelEvent::setScenePos(), QGraphicsSceneContextMenuEvent::setScenePos(), QGraphicsSceneHoverEvent::setScenePos(), QGraphicsSceneHelpEvent::setScenePos(), QGraphicsSceneDragDropEvent::setScenePos(), QGraphicsSceneMouseEvent::setScreenPos(), QGraphicsSceneWheelEvent::setScreenPos(), QGraphicsSceneContextMenuEvent::setScreenPos(), QGraphicsSceneHoverEvent::setScreenPos(), QGraphicsSceneHelpEvent::setScreenPos(), QGraphicsSceneDragDropEvent::setScreenPos(), QGraphicsSceneDragDropEvent::setSource(), QGraphicsSceneDragDropEvent::source(), QFileOpenEvent::url(), QGraphicsView::viewportEvent(), QChildEvent::~QChildEvent(), QFileOpenEvent::~QFileOpenEvent(), and QGestureEvent::~QGestureEvent().

◆ m_accept

ushort QEvent::m_accept
private

Definition at line 321 of file qcoreevent.h.

◆ posted

ushort QEvent::posted
private

◆ reserved

ushort QEvent::reserved
private

Definition at line 322 of file qcoreevent.h.

◆ spont

ushort QEvent::spont
private

Definition at line 320 of file qcoreevent.h.

Referenced by QApplication::notify(), and QApplicationPrivate::notify_helper().

◆ t

ushort QEvent::t
protected

The documentation for this class was generated from the following files: