[PyQt] Decorated slot has no compatible signature
Detlev Offenbach
detlev at die-offenbachs.de
Mon Nov 21 07:47:29 GMT 2016
You could simply un-decorate your slot. That should make it work.
Detlev
On Sunday 20 November 2016, 22:46:08 Tony Arnold wrote:
> Florian,
>
> On Sun, 2016-11-20 at 21:19 +0100, Florian Bruhin wrote:
>
> > * Tony Arnold <tony.arnold at manchester.ac.uk> [2016-11-20 19:16:01
> > +0000]:
> >
> > > I'm using QNetworkManager to upload some files to a site. To see
> > > the
> > > progress I've defined a slot that gets connected to the
> > > uploadProgress
> > > signal.
> > >
> > > The slot is defined:
> > >
> > > @pyqtSlot(int, int)
> > > def updateDataTransferProgress(self, readBytes, totalBytes):
> > >
> > > and is connected to a reply object thus:
> > >
> > > reply.uploadProgress.connect(self.updateDataTransferProgress)
> > >
> > > However, this gives the error message:
> > >
> > > TypeError
> > > "decorated slot has no signature compatible with
> > > uploadProgress(qint64,qint64)"
> > >
> > > I'm running on Ubuntu 16.10 which has PyQt5.7. I believe slot
> > > verification has been tightened
> > > up in this version, but as far as I can see the above declaration
> > > is correct.
> > >
> > > How can I fix this?
> >
> >
> > Use @pyqtSlot('qint64', 'qint64') instead.
>
>
> Thanks. I tried this and I now get
>
> The debugged program raised the exception unhandled TypeError
> "connect() failed between uploadProgress(qint64,qint64) and
> updateDataTransferProgress()"
>
> Regards,
> Tony.
> --
> Tony Arnold MBCS, CITP | Senior IT Security Analyst | Directorate of IT
> Services | G64, Kilburn Building | The University of Manchester |
> Manchester M13 9PL | T: +44 161 275 6093 | M: +44 773 330 0039
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt--
*Detlev Offenbach*
detlev at die-offenbachs.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20161121/8519f623/attachment.html>
More information about the PyQt
mailing list