I'm new to Python, Qt and PyQt so this is probably just a simple misunderstanding of the syntax for signals & slots
<Code snippet>
class DlgDataBrowser(frmDataBrowser):
def __init__(self, parent=None, name=None, modal=0, fl=0):
frmDataBrowser.__init__(self, parent, name, fl)
self.connect(self.dbrMemReg, SIGNAL('currentChanged(QSqlRecord)'),
self.test)
def test(self, *args): print 'New record'
</Code snippet>
Every time I try to run this it raises an error on the connect statement of
Signal has wrong argument types for slot
I've tried all sorts of ideas (some sane, some just plain daft) but I'm stuck. Could someone put me out of my misery please and point out just what I'm doing wrong.
I assume the type of self.dbrMemReg is QDataBrowser or QDataTable. Then the signal is 'currentChanged(const QSqlRecord*)'. Consider that Qt is written in C++ and that there is a big difference between a QSqlRecord, a QSqlRecord*, a QSqlRecord& and their const variants, because type safety is a big issue there.
greetings
Torsten
-- Torsten Marek <[EMAIL PROTECTED]> ID: A244C858 -- FP: 1902 0002 5DFC 856B F146 894C 7CC5 451E A244 C858 www.keyserver.net -- wwwkeys.eu.pgp.net
signature.asc
Description: PGP signature
signature.asc
Description: OpenPGP digital signature
