📜  QCompleter con sql 代码示例

📅  最后修改于: 2022-03-11 15:05:13.179000             🧑  作者: Mango

代码示例1
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);