If you're using C++11, you can connect directly to a lambda that then invokes your function with a specified parameter.
Otherwise, figure out what object is the sender()
of your signal, and set a dynamic property on that object. That property can be queried in the slot, and passed on to the function as a parameter.
For example (within a class):
void setup() {
QState *s2 = new QState();
s2->assignProperty(myLabel, "text", "state two");
s2->setProperty("prop", 0);
connect(s2, SIGNAL(entered()), io, SLOT(testSlot()));
}
Q_SLOT void testSlot() {
QObject *obj = this->sender();
QVariant prop = obj->property("prop");
qDebug() << __FUNCTION__ << prop.toString();
}