I ran into a problem that I need to save the parameters of the displayed source signal. So far, I have only found examples for displaying signals without any parameters. For example, the signal clicked ():
signalMapper = new QSignalMapper(this); signalMapper->setMapping(taxFileButton, QString("taxfile.txt")); connect(taxFileButton, SIGNAL(clicked()), signalMapper, SLOT (map())); connect(signalMapper, SIGNAL(mapped(QString)), this, SLOT(readFile(QString)));
However, I will need to display some signal with its own parameters, for example, by clicking (bool), then SLOT should have two doStuff arguments (bool, QString):
connect(taxFileButton, SIGNAL(clicked(bool)), signalMapper, SLOT (map())); connect(signalMapper, SIGNAL(mapped(QString)), this, SLOT(doStuff(bool,QString)));
However, this does not work? Is there any work around?
Thanks!
Wang
source share