📅  最后修改于: 2022-03-11 15:05:13.179000             🧑  作者: Mango
QSqlTableModel * model = new QSqlTableModel(this,db);
model->setTable( "Customer" );
model->select();
QCompleter *Account_completer = new QCompleter(model, this);
completer->setCompletionColumn(someIndex);
ui->somelineedit->setCompleter(Account_completer);