connect(guziki1, SIGNAL(clicked()), signalMapper, SLOT(map()));
signalMapper->setMapping(guziki1, "test");
connect(signalMapper,
SIGNAL(mapped
(QString)),
this,
SLOT(myFun
(QString)));
connect(guziki2, SIGNAL(clicked()), signalMapper, SLOT(map()));
signalMapper->setMapping(guziki2, "test");
connect(signalMapper,
SIGNAL(mapped
(QString)),
this,
SLOT(myFun
(QString)));
[...]
guziki1 = new QPushButton;
connect(guziki1, SIGNAL(clicked()), signalMapper, SLOT(map()));
signalMapper->setMapping(guziki1, "test");
connect(signalMapper, SIGNAL(mapped(QString)), this, SLOT(myFun(QString)));
guziki2 = new QPushButton;
connect(guziki2, SIGNAL(clicked()), signalMapper, SLOT(map()));
signalMapper->setMapping(guziki2, "test");
connect(signalMapper, SIGNAL(mapped(QString)), this, SLOT(myFun(QString)));
[...]
To copy to clipboard, switch view to plain text mode
Bookmarks