Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
16 November 2023
With Qt's signals & slots mechanism, you can also connect to a lambda expression.
In this episode, you will learn how to do that, and equally important, what the pitfalls are when you do that.
00:00 Introduction
00:26 Lambda Syntax
03:54 Code Example
08:12 Deleted Object Rules
12:06 Signal-Slot Connection Rules
15:04 Disconnecting
17:23 When to use Lambdas
The example code showcased in this video is available here: https://github.com/KDAB/kdabtv/tree/master/Programming-With-Qt-Widgets
All 'Introduction to Qt Widgets' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6iFcTyItvnE5nOmJR8qk_7o
All 'Introduction to Qt Widgets - Module 1' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6hgf7zCKF2Rv9Y0WoN8RVGf
Links:
* Heaptrack: https://github.com/KDE/heaptrack
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Learn Modern C++
Our hands-on Modern C++ training courses are designed to quickly familiarize newcomers with the language. They also update professional C++ developers on the latest changes in the language and standard library introduced in recent C++ editions.
Learn more