In this article we will see how we can get the role of selected item in the combo box. Role is basically additional data provided with the item, in order get the role of selected item we use
Syntax : combo_box.currentData()
Argument : It takes no argument
Return : It return string i.e role of selected item
Below is the implementation –
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.