Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Why it only show 1 name in my database i have 5 what is wrong with my code?
A Former User last edited by VRonin
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.
A Former User last edited by
@p3c0 Thank you! i already solve the problem ^_^