I want to implement Filter widget using QComboBox. The way it should work is, when I type letter 'a' it should show the items that are starting with 'a', and then if I type 'b' it should show the items that have the prefix 'ab' etc. I tried by overriding keyPressEvent
of QComboBox
class, but it didn't work. The main problem I got is, how can I make the QComboBox
editable while the drop down list is appearing ? I'm opening dropdown list inside the key press event like this,
void SearchCombo::keyPressEvent(QKeyEvent *e)
{
...
listBox()->popup();
...
}