Got it, thanks.

It's unfortunate that there is a method and a signal in QAbstractSocket
witht the same name, but I guess we're stuck with that now.

It's tricky coming up with the correct "signature" syntax if not having
seen it before. Maybe some example code could be added to this page here,

http://qt-project.org/doc/qt-5.1/qtcore/signalsandslots.html ?


Cheers,

Ola







2013/11/22 Thiago Macieira <thiago.macie...@intel.com>

> On sexta-feira, 22 de novembro de 2013 16:56:47, Ola Røer Thorsen wrote:
> > Is this a bug in Qt, or did I not use the correct syntax? I recon this
> has
> > to do with QAbstractSocket having the error() function as well as an
> error
> > signal.
>
> You did not use the correct syntax.
>
> The compiler told you that the problem was that you did not select one of
> the
> overloads. QTcpSocket::error points to multiple functions and you need to
> select one only.
>
> To do that, you need to cast the identifier to a specific signature.
>
>     void (QAbstractSocket:: *sig)(QAbstractSocket::SocketError) =
>         &QAbstractSocket::error;
>     connect(tcp_socket, sig, this, &MyClass::tcpSocketError);
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to