Why it only show 1 name in my database i have 5 what is wrong with my code?
self.query = QSqlQuery("SELECT name FROM test_table") # while(self.query.next()): self.cb = QComboBox(self) self.cb.addItem(self.query.value(0).toString()) # self.show()
@Gelo Not exactly sure about python but it seems you are creating a new
QComboBoxinside the loop everytime it iterates.
@p3c0 Thank you! i already solve the problem ^_^