It is not only possible to connect one signal to one slot, but to connect one signal to more than one slot. This involves repeating the QObject::connect() call and, in each instance, specifying the slot that should be called when a particular signal has been emitted.
Signals and slots configuration
Single signal, multiple slots
In this section, we shall concern ourselves with how to connect a single signal to multiple slots.
Examine the following program:
#include <QApplication>
#include <QVBoxLayout>
#include <QLabel>
#include <QDial>
#include <QLCDNumber>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget *window = new QWidget;
QVBoxLayout *layout = new QVBoxLayout;
QLabel...