[PyQt] populate Qcombobox
Tony Peña
emperor.cu at gmail.com
Thu Jul 28 19:22:37 BST 2011
Hi.
I have some data into DB and i want to populate that into Combobox and get
some errors
for countries in cursor.execute("SELECT Country FROM
iata_icao_codes;"):
self.connect(self.ui.country_list.addItem(0, str(countries)))
error:
TypeError: arguments did not match any overloaded call:
QComboBox.addItem(QString, QVariant userData=QVariant()): argument 1 has
unexpected type 'int'
QComboBox.addItem(QIcon, QString, QVariant userData=QVariant()): argument 1
has unexpected type 'int'
i Try with this form:
for countries in cursor.execute("SELECT Country FROM
iata_icao_codes;"):
self.connect(self.ui.country_list.insertItems(0, countries))
TypeError: arguments did not match any overloaded call:
QObject.connect(QObject, SIGNAL(), QObject, SLOT(),
Qt.ConnectionType=Qt.AutoConnection): argument 1 has unexpected type
'NoneType'
QObject.connect(QObject, SIGNAL(), callable,
Qt.ConnectionType=Qt.AutoConnection): argument 1 has unexpected type
'NoneType'
QObject.connect(QObject, SIGNAL(), SLOT(),
Qt.ConnectionType=Qt.AutoConnection): argument 1 has unexpected type
'NoneType'
any idea?
thanxs by the way
--
Antonio Peña
Secure email with PGP 0x8B021001 available at http://pgp.mit.edu
Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110728/67b288d7/attachment.html>
More information about the PyQt
mailing list