Hi,
I set QCompleter to QLineEdit object… it works fine but I can’t get the current index from QCompleter by currentIndex() because it always return 0 for row index.
PS
I call currentIndex() from QLineEdit editingFinished() slot.
void MainWindow::on_lineEdit_find_editingFinished()
{
if (p_db.isOpen()) {
/*! \bug Set current row from the completer
*/
ui->tableView_table->setCurrentIndex(completer->currentIndex());
qDebug() << completer->currentIndex().row();
}
}
↧