qcombobox

PyQt: How to set Combobox Items be Checkable?

孤街浪徒 提交于 2019-11-26 16:56:54
问题 To keep the GUI widgets number to minimum I need to find a way to give to user a choice of pull-down menu items that could be used to filter out the displayed in a listWidget items. Let's say the listWidget lists 5 different categories of Items: "Cat A", "Cat B","Cat C","Cat D","Cat E". I could implement the radio or checkboxes for each item category. But then 5 radio buttons or checkboxes would take a lot of GUI space. A combobox with the checkable items seems to be a right choice. Any ideas

QCompleter Custom Completion Rules

假装没事ソ 提交于 2019-11-26 06:37:57
问题 I\'m using Qt4.6 and I have a QComboBox with a QCompleter in it. The usual functionality is to provide completion hints (these can be in a dropdown rather than inline - which is my usage) based on a prefix. For example, given chicken soup chilli peppers grilled chicken entering ch would match chicken soup and chilli peppers but not grilled chicken . What I want is to be able to enter ch and match all of them or, more specifically, chicken and match chicken soup and grilled chicken . I also