Go look up "C++ lambda expression" in your C++ book or online. And read the Qt 5 documentation for QObject::connect().