Issue
I'm on python 2.7 using pyqt 4.10, I've created a QcomboBox
for items in item_all:
self.comboBox.addItem(items)
the item_all
list is working perfectly but I need it to start with the default value as Empty (note that item_all
list is being called from a DB table so I can't have an empty value to use it)
Solution
Added a space to the item_all
list before fetching it from the DB
item_all= ['',]
for items in c.fetchall():
item_all.append(items)
self.comboBox_2.clear()
self.comboBox_2.addItems(item_all)
Answered By - Ahmed Wagdi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.