I'm trying to make a Completion when pressing tab, you get the first completion of all possibilities.
But, in a QWidget
-based main window, pressing tab will make that QLineEdit
lost focus, and completion popup hides after that.
Is there a way to fix it ?
There is probably a better solution but one that comes to mind is to change the focus policy for all other widgets on the form to something that doesn't include "tab" focus. The only options that don't use the tab key are
Qt::ClickFocus
andQt::NoFocus
.