[PyQt] Problem using signal beforeInsert
bar tomas
bartomas at gmail.com
Thu Jan 21 13:38:45 GMT 2010
Hi,
I've created a QDataWidgetMapper that uses a QSqlRelationalTableModel
to edit the records of database table.
I've tried using the signal beforeInsert to do some validation before
the data is submitted to the database but I have a problem
intercepting the signal (the slot method test just never executes).
Here is a snippet of the relevant code:
self.model = QSqlRelationalTableModel(self)
self.connect(self.model, SIGNAL("beforeInsert(record)"), self.test)
def test(self, record):
print "test"
Is there something wrong in the way I've declared the connection?
Many thanks
More information about the PyQt
mailing list