[PyQt] QNetworkReply pyQt

Christopher Probst christop.probst at gmail.com
Wed May 3 17:15:40 BST 2017


I am going to send the example again without a dependency to my project.
For some odd reason the finished signal is never received.

import sys

from PyQt5.QtWidgets import QApplication
from PyQt5.QtNetwork import *
from PyQt5.QtCore import *

class DebugginClass(QObject):
    def __init__(self, parent=None):
        QObject(parent)

    @pyqtSlot()
    def debugging(self):
        print("Signal finished emitted")


if __name__ == "__main__":
    app = QApplication(sys.argv)


    debugClass = DebugginClass()
    manager = QNetworkAccessManager()

    manager.finished['QNetworkReply*'].connect(debugClass.debugging)

    manager.get(QNetworkRequest(QUrl("http://qt.nokia.com")));


    sys.exit(app.exec_())


On Wed, May 3, 2017 at 12:10 PM, Christopher Probst <
christop.probst at gmail.com> wrote:

>
> So I tried this self-contained example from the documentation, the
> finished signal is never emitted. What am I doing wrong? I am using pyQt5
> and python 3.5.
>
>
> import sys
>
> from PyQt5.QtWidgets import QApplication
> from PyQt5.QtNetwork import *
> from PyQt5.QtCore import *
> from downloadmgrWidget import DownloadManagerWidget
>
> class DebugginClass(QObject):
>     def __init__(self, parent=None):
>         QObject(parent)
>
>     @pyqtSlot()
>     def debugging(self):
>         print("Signal finished emitted")
>
>
> if __name__ == "__main__":
>     app = QApplication(sys.argv)
>
>
>     debugClass = DebugginClass()
>     manager = QNetworkAccessManager()
>
>     manager.finished['QNetworkReply*'].connect(debugClass.debugging)
>
>     manager.get(QNetworkRequest(QUrl("http://qt.nokia.com")));
>
>
>     sys.exit(app.exec_())
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170503/1cbe3769/attachment.html>


More information about the PyQt mailing list