GlobalSearchWidget - Strange behavior

Hello,

I’m experiencing some unexpected behavior with the GlobalSearchWidget from tk-framework-qtwidgets. When typing the completer shows it’s popup and I can arrow through the list of entities. If I press return or I click an item in the list the QLineEdit is cleared. What I was expecting to happen is for this to commit the entities name to the QLineEdit.

The only way I can get the text to stay in the QLineEdit is if I hit tab or simply click on another widget so the completer’s popup loses focus.

Any ideas on why this widget works this way, or how I can adjust it?

2 Likes

In case anyone else runs into this, my solution was to disconnect the “clear” slot from the QCompleter’s “entity_activated” signal.

widget = search_widget.GlobalSearchWidget(...)
widget.completer().disconnect(widget.clear)

I would create an issue in the tk-framework-qtwidgets repo but it looks like issues are disabled there.

3 Likes

Thanks for closing the loop on the solve, @Dan_Bradham—we’ll relay your finding to the team. :slight_smile:

1 Like