I would like to supply my own parameter (different from the Signal) to the Slot. I know this code doesn’t work, but perhaps it illustrates the idea of what I am trying to accomplish.
QAction* a;
a = new QAction(this);
connect(action, SIGNAL(triggered()), this, SLOT(setFoo(1.0f)));
a = new QAction(this);
connect(action, SIGNAL(triggered()), this, SLOT(setFoo(2.0f)));
Is this possible, or what would you have done when faced with similar problem?
↧