June 2018
Intermediate to advanced
348 pages
8h 45m
English
In Qt, events represent things that have happened within an application or a user activity that the application needs to know about. In Qt, events are the objects derived from an abstract QEvent class. Events can be received and handled by any instance of a QObject subclass, but they are especially relevant to widgets.
Whenever an event occurs, an appropriate QEvent subclass instance gets constructed and gives its possession to a particular instance of QObject (or any relevant subclass) by calling its event() function. This function does not handle the event itself; based on the type of event delivered, it calls an event handler for that specific type of event and sends a response based on whether the event was accepted or ignored. ...