python - help needed combo box - replace current items with current filtered

Job ID: 30737364

Budget: $30 – $250 AUD

we have a management system built on vba.
Intend to replace vba code with python. We are at the start of the project.

We have a pyqt5 combo box that helps filter down to the jobs we need to find base on the keywords typed in the combo box (refer to attached py script).

requirement:
1. need to click a "narrow" button (refer to screenshot) and replace the current combo box items to the items displayed only (after applying the filtere) and clear the content of the combo's current text in readiness for new input.

e.g. say the combo items have the full 5000 jobs initially. If we type "abc", the filtered items may drop to 50 jobs.
want to click the button so that the combo box items are replaced by the 50 jobs only (by creating a list variable to keep) and have the "abc" keyword cleared. We can then type further keywords to search the list of 50 jobs only (not 5000 jobs).

2. anytime pressing "esc" key will trigger clearing of keyword typed in the entry box. e.g. if we have typed "dog" and press "esc", the keyword "dog" will be cleared

3. when clicking on the client menu item (refer to attached screenshot), it will trigger an action to read the string of selected item
The job should read something like [Y]2020[P]Q1[J]Consult[C]Troy Danny[G]Troy Group

It will open folder in default file browser of the operating sytem. If not exists, then will create the folder first.
The folder will be determined by the job selected.
for above example, c:\client\Troy Danny\2020\Q1 Consult\

Thanks
Related categories: Python