[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Issue with QNetworkInformation
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2021-09-05 12:13:44
Message-ID: 66fb3950f6f56e2892502617952060dc () riverbankcomputing ! com
[Download RAW message or body]

On 04/09/2021 18:50, Detlev Offenbach wrote:
> Hello,
> 
> I am facing an issue with QNetworkInformation. Trying to connect to
> the signal 'reachabilityChanged' fails with an error. Please see below
> for a console example. According to the error printed, no such signal
> exists but looking at the sip file shows, that it should. Please help
> me solve it.
> 
> ------------------------------------------------------------------------
> 
>>>> from PyQt6.QtCore import pyqtSlot
>>>> from PyQt6.QtNetwork import QNetworkInformation
>>>> @pyqtSlot(QNetworkInformation.Reachability)
> ... def reachabilityChanged(reach):
> ...  print(reach)
> ...
>>>> QNetworkInformation.load(QNetworkInformation.Feature.Reachability)
> True
>>>> QNetworkInformation.instance().reachability()
> <Reachability.Online: 4>
>>>> QNetworkInformation.instance().reachabilityChanged.connect(reachabilityChanged)
> StdErr: qt.core.qobject.connect: QObject::connect: No such signal
> QNetworkInformation::reachabilityChanged(QNetworkInformation::Reachability)
> neptun/12848/main: Traceback (innermost last):
>   File "<stdin>", line 1, in <module>
> TypeError: connect() failed between
> reachabilityChanged(QNetworkInformation::Reachability) and unislot()
>>>> 
> 
> ------------------------------------------------------------------------

Should be fixed in the next snapshot.

Thanks,
Phil
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic