Summary
In this chapter, we looked at the core concepts of signals and slots in Qt. We discussed different ways of connecting signals and slots. We also learned how to connect one signal to multiple slots and multiple signals to a single slot. Then, we looked at how to use them with Qt Widgets, as well as in QML, as well as the mechanism behind the signal and slot connection. After that, you learned how to communicate between C++ and QML using signals and slots.
This chapter also discussed events and event loops in Qt. We explored how to use events instead of the signal-slot mechanism. After doing this, we created a sample program with a custom event handler to capture events and filter them.
After learning about events, we implemented a simple drag and drop example. Now, you can communicate between classes, between C++ and QML, and implement the necessary actions based on events.
In the next chapter, we will learn about Model View programming and how to create custom models...