QComboBox returns None Type . How to get Current Data ?
- by vettipayyan
I've implemented 2 QComboBoxes with one having items manually inserted every time and another one having items inserted with a list (I'm using Python )
But when i attempt to get the current value of Combobox , it returns None .
I proceeded as specified in this question :
I referred this
i have provided wat i've coded ."command" and "option" are QComboBoxes ( Pardon me for bad style) Is there any mistake in Indexes ?
self.command.insertItem(1,'Convert')
self.command.insertItem(2,'Compose')
self.command.insertItem(3,'Animate')
self.option.insertItems(268,list)
and retrieval :
self.selected_com=self.command.itemData(self.command.currentIndex())
self.selected_opt=self.option.itemData(self.option.currentIndex())