I have a problem with this piece of code.
projList
is a variable of type list
. self.projPicker
is an instance of QComboBox
.
self.projPicker.addItems(projList)
self.projPicker.currentTextChanged.connect(self.itemListChange)
def itemListChange(self,value):
self.projPathLbl.setText("Project : " + value)
def itemListUpdate(self):
comboItems = []
for item in range (self.projPicker.count()):
comboItems.append(self.projPicker.itemText(item))
print(comboItems)
With this code, when I add text in in the combobox the self.projPathLbl
is updated with the itemListChange()
function each time I type a character .
My problem is, it doesn't work the same way with the itemListUpdate()
.
With this function, I need to hit the Return key to the update to be effective.
How can I update my self.projPathLbl
label the same way I update my comboItems
list ( validating it with the Return key )?