查找Qdiaglog中的子控件 QDialog *SetDataDialog; QObjectList childrenwidget = SetDataDialog->children(); QObject *bu = childrenwidget.at(0); buttombox = qobject_cast<QWidget *>(bu);