Hi,
I want to display Completer ,when my line edit text is empty
How do i do these?
Thanks
Addu
Printable View
Hi,
I want to display Completer ,when my line edit text is empty
How do i do these?
Thanks
Addu
QCompleter::complete(QRect) from your lineedit/textedit...
Hi
Completer pop up is not displayed , while line edit text is empty
code
completer = new QCompleter(wordList, ui->lineEdit);
completer->setCompletionMode(QCompleter::PopupCompletion);
ui->lineEdit->setCompleter(completer);
ui->lineEdit->completer()->complete();
even
ui->lineEdit->completer()->popup()->show(); is not helping me to show completer popup
Thanks
Addu R
If you are are calling complete() in constructor then you can notice that the popup actually appears for a moment just before the main window. Best solution would be probably this:
Code:
ui->lineEdit->addAction(action); connect(action, SIGNAL(triggered()), completer, SLOT(complete()));
But if you really want the popup to appear together with main window then this could do the trick:
Code:
... } void MainWindow::func() { completer->complete(); }