June 2018
Intermediate to advanced
348 pages
8h 45m
English
Signals and slots are mechanisms used in Qt to achieve communication between objects. The signals and slots mechanism is a central feature of Qt, as a GUI framework. Widgets get notified about changes in other widgets in Qt through this mechanism. In general, objects of any kind communicate with one another using this mechanism. For example, when a user clicks on a close button, we probably want the window's close() function to be called.
Signals and slots are alternatives to the callback technique in C/C++. A signal gets emitted when a particular event occurs. All of the widgets in the Qt framework have predefined signals, but we can always subclass a widget to add our own signals to it. A slot is a function that gets called ...