问题描述
- 错误 no matching function for call to 'QLineEdit::setText(QMode|Index&)'
-
void gz::on_pushButton_2_clicked() { static QSqlQueryModel *model = new QSqlQueryModel(ui->tableView); model->setQuery(QString("select * from yggzinfo;")); int column = model->columnCount(); //获得列数 int row = model->rowCount(); // 获得行数 QModelIndex index = model->index(column,row,QModelIndex()); ui->lineEdit->setText(index); }
时间: 2024-09-03 07:07:43