这里父控件是QGroupBox,子控件是QLineEdit
QList<QLineEdit*> list = ui.groupBox_11->findChildren<QLineEdit*>(); for (int i = 0; i < list.size(); i++) { QLineEdit* le = list.at(i); le->setText(QString::number(i)); }
原文地址:https://www.cnblogs.com/judes/p/9480507.html
时间: 2024-10-31 13:39:02