I\'m making a little chat messenger program, which needs a list of chat channels the user has joined. To represent this list graphically, I have made a list of QPushButton
QPushButton
You could try having your switchTab slot take no argument and use QObject::sender to get the object that sent the signal.
switchTab
Messenger::switchTab() { QObject* sender = this->sender(); QPushButton* button = qobject_cast(sender); if(button) { // Do stuff... } }