QComboBox signal when user types text and presses Enter
-
Hi,
You can use the QLineEdit::editingFinished signal. QComboBox provides a getter for its QLineEdit that is available when in editable mode.
-
@SGaist Its working but combobox max item count is set to 5. I was hoping it will show the last 5 items in dropdown, however, once the dropdown fills up with 5 items then new items entered in the Edit are Not added. How do I change this behavior to mimic MRU?
Is it possible to have 2 sticky items i.e. they always stay in the dropdown menu But remaining 3 items are MRU?
-
@Taytoo said in QComboBox signal when user types text and presses Enter:
then new items entered in the Edit are Not added
Are you sure? You probably need to scroll in the drop down box to see new items at the bottom.
-
@jsulm said in QComboBox signal when user types text and presses Enter:
@Taytoo said in QComboBox signal when user types text and presses Enter:
then new items entered in the Edit are Not added
Are you sure? You probably need to scroll in the drop down box to see new items at the bottom.
Yes, like I mentioned earlier, the problem is once you set maxCount (in my case 5) then no new items are added after 5 limit is reached. It keeps the first 5 items entered by the user, 6th, 7th etc items are not added.