Removing the completer from the QLineEdit
will effectively disable it, you can later set it back again to enable it. To remove it, call QLineEdit::setCompleter(QCompleter*)
with a null pointer. Use the same member function to set/restore it again later.
Temporarily disable QCompleter?
-
29-05-2022 - |
Question
I have a QLineEdit
plus a QListView
widget,
- When then
QListView
is visible, the completer should be disabled. - Otherwise the completer is enabled.
But it appears like there's no enable/disable interface for QCompleter
. What should I do then?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow