How to make a QPushButton disabled

If I understood correctly you connected various QPushButtons to the same slot. Inside of the slot deneme() you want to know which of the buttons was clicked.
You can do something like:

  void deneme() {
    QPushButton * b = qobject_cast<QPushButton *>(sender());
    if (b) {
       if (b == button1) { //button1 clicked
           //doSomething();
       } 
       else {
          if (b == button2) {
             //doSomething();
          }
       }
       b->setEnabled(false);
    }
  }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)