Reputation: 138
I create an application with QCompleter. I would like to show all items from completer when the QLineEdit is empty. But i dont know how to do it. I found a C++ code with a similiar question but i need to do it on Python.
if(lineEdit->text().isEmpty())
{
lineEdit->completer()->setCompletionPrefix("");
lineEdit->completer()->complete();
}
Method setCompletionPrefix
does not work in Python
Please help me solve this task on Python
Python 3.6.8, PyQT5 5.15.4
Upvotes: 2
Views: 345