The debugged program raised the exception unhandled TypeError “argument 3 of QObject.connect() has an invalid type”
dmenu = self.menu.addMenu(u'Копировать в')
self.connect (dmenu.addAction(u'Эл.Накладные') , SIGNAL('triggered()'), self.CopyToo('dbf'))
self.menu.exec_(QCursor.pos())
@pyqtSignature("QString")
def CopyToo(self, name):
s = self.listWidget.item(self.a).text()
if name =='dbf':
i=0
if name == 'def':
i=1
if name == 'msg':
i=2
if self.listWidget.item(i).text() != 'noting':
sql = "UPDATE %s SET adres = '%s' where nom = %s" % (name,s,self.Fd_Edit_Nm.text())
else:
sql = "INSERT INTO %s(nom, adres) VALUES ('%s', '%s')" % (name,self.Fd_Edit_Nm.text(),s)
try:
self.cur.execute(sql)
self.con.commit()
except:
self.msg.question(self, 'Message', u'Ошибка записи! " %s' % (sql))
self.on_Fd_Button_Fd_clicked() /code