Unsolved How to update or create new model of QCompleter?
-
I'm try code:
completeT = new QCompleter( listString, this ); completeT ->setCaseSensitivity( Qt::CaseInsensitive ); completeT ->setCompletionMode( QCompleter::PopupCompletion ); completeT ->setFilterMode( Qt::MatchContains ); ui->txt_lineEdit->setCompleter( completeT );
and I update by code:
completeT ->setModel( new QStringListModel( listCompleteT, this) );
and I have error:
How to update QStringList in my QCompleter?
if new QCompleter() that increase memory and optimal? -
Hi,
Update the content of the model you use for the completer. No need to recreate stuff again and again.