Skip to Content
C++ Reactive Programming
book

C++ Reactive Programming

by Praseed Pai, Peter Abraham
June 2018
Intermediate to advanced
348 pages
8h 45m
English
Packt Publishing
Content preview from C++ Reactive Programming

Signals and slots

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Functional Programming in C++

Functional Programming in C++

Ivan Cukic

Publisher Resources

ISBN: 9781788629775Supplemental Content