solved:
if interesting
	
	{
    QCompleter * cl 
= qobject_cast<QCompleter 
* >
(sender
());
     QComboBox * cb 
= qobject_cast<QComboBox 
* >
(sender
()->parent
());
  
    int completer_id=cl->completionModel()->data(cl->completionModel()->index(s.row(),0)).toInt();
 
    QModelIndexList indexList = cb->model()->match(cb->model()->index(0,0), Qt::DisplayRole, completer_id, 1, Qt::MatchExactly);
    if(indexList.count())
    {
        cb->setCurrentIndex(index.row());
    }
}
        void EventDialog::popUpIndex(QModelIndex s)
{
    QCompleter * cl = qobject_cast<QCompleter * >(sender());
    QComboBox * cb = qobject_cast<QComboBox * >(sender()->parent());
    int completer_id=cl->completionModel()->data(cl->completionModel()->index(s.row(),0)).toInt();
    QModelIndexList indexList = cb->model()->match(cb->model()->index(0,0), Qt::DisplayRole, completer_id, 1, Qt::MatchExactly);
    if(indexList.count())
    {
        QModelIndex index=indexList.first();
        cb->setCurrentIndex(index.row());
    }
}
To copy to clipboard, switch view to plain text mode 
  
				
			
Bookmarks