Qt Code:
  1. class buttons: public QWidget
  2. {
  3. Q_OBJECT
  4. public:
  5. buttons(QWidget *parent = 0);
  6.  
  7. private slots:
  8. void blocked();
  9.  
  10. //LOOK HERE
  11. QPushButton *Button7;
  12.  
  13.  
  14. };
  15.  
  16. #endif
  17.  
  18. buttons.cpp
  19.  
  20. QPushButton *deshabilitar = new QPushButton(tr("deshabilitar"), this);
  21. connect(deshabilitar, SIGNAL(clicked()),this, SLOT(blocked()));
  22.  
  23. //LOOK HERE
  24. //QPushButton *Button7= new QPushButton(tr("Button7"), this);
  25. Button7= new QPushButton(tr("Button7"), this);
  26.  
  27. void buttons:: blocked( )
  28. {
  29. //FINALLY LOOK HERE
  30. //Button7.setDisabled(true);
  31. Button7->setDisabled(true);
  32. }
To copy to clipboard, switch view to plain text mode 

make other buttons the member as well