QObject::connect(ui->pushButton,SIGNAL(clicked()),this,SLOT(alfavit(x=1)));//пример слота void MainWindow::alfavit(int x){x=6;}
C++ (Qt)if (sender() == button1) myfucntion(1);else if (sender() == button2) myfunction(2);...
if (sender() == ui->pushButton) myfunction(1);else if (sender() == ui->pushButton_2) myfunction(2);
C++ (Qt)alfavit( int x ){ } connect( btn1, SIGNAL( clicked() ), this, SLOT( slotBtn1Pres() ) );// ...connect( btn10, SIGNAL( clicked() ), this, SLOT( slotBtn10Pres() ) ); slotBtn1Pres(){alfavit( 1 );} // ... slotBtn10Pres(){alfavit( 10 );}