C++ (Qt)void MyClass::setButtonsInactive(QWidget* wgt=0){ if (!wgt) wgt = this; // Бывает )) for (int i=0; i<wgt->children().size(); ++i) { QPushButton* trybutton = qobject_cast <QPushButton*> (wgt->children().at(i)); if (trybutton) {trybutton->setEnabled(false); continue;} QWidget* tryWidget = qobject_cast <QWidget*> (wgt->children().at(i)); if (tryWidget) {setButtonsInactive(tryWidget);} }}
C++ (Qt)void MyClass.setButtonsInactive(QWidget* wgt=this)