const QList<QLineEdit*> lineEdits = ui->stackedWidget->currentWidget()->findChildren<QLineEdit*>(); for (QLineEdit *lineEdit : lineEdits) { qDebug() << lineEdit->text(); }
lineEdit在list中顺序,按照taborder的顺序。