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

List:       pykde
Subject:    [PyQt] QNetworkReply pyQt
From:       Christopher Probst <christop.probst () gmail ! com>
Date:       2017-05-03 14:53:37
Message-ID: CABhWjnoU36EscFig1HyLkvjn+q-es1S=s_S-tZwsFZJ7FQ17+A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


new to pyQt and I am stumped. I am trying to get the QNetworkAccessManager
class to work with these lines

class Download(QNetworkAccessManager):

..

self.m_reply = self.get(QNetworkRequest(QUrl("http://download.qt.io/official_releases/qt/5.8/5.8.0/single/qt-everywhere-opensource-src-5.8.0.tar.gz")))


self.m_reply.readyRead.connect(self.debugging)
self.m_reply.error.connect(self.debugging)
self.m_reply.finished.connect(self.debugging)

..


where debugging is a slot

@pyqtSlot()
def debugging(self):
    print("downloadProgress")


Problem is, it looks as if the readyRead, error or finished signal are
never emitted. What am I doing wrong?


Thanks,
Christopher


[Attachment #5 (text/html)]

<div dir="ltr"><br><div>new to pyQt and I am stumped. I am trying to get the \
QNetworkAccessManager class to work with these lines<br></div><div><pre \
style="color:rgb(0,0,0);font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt"><pre style="font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt"><span style="color:rgb(0,0,128);font-weight:bold">class \
</span>Download(QNetworkAccessManager):</pre><pre style="font-family:&quot;dejavu \
sans mono&quot;;font-size:11.4pt">..</pre></pre><pre \
style="color:rgb(0,0,0);font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt"><span style="color:rgb(148,85,141)">self</span>.m_reply \
= <span style="color:rgb(148,85,141)">self</span>.get(QNetworkRequest(QUrl(<span \
style="color:rgb(0,128,128);font-weight:bold">&quot;<a \
href="http://download.qt.io/official_releases/qt/5.8/5.8.0/single/qt-everywhere-openso \
urce-src-5.8.0.tar.gz">http://download.qt.io/official_releases/qt/5.8/5.8.0/single/qt-everywhere-opensource-src-5.8.0.tar.gz</a>&quot;</span>)))<br><span \
style="color:rgb(148,85,141)"><br></span></pre><pre \
style="color:rgb(0,0,0);font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt"><span \
style="color:rgb(148,85,141)">self</span>.m_reply.readyRead.connect(<span \
style="color:rgb(148,85,141)">self</span>.debugging)<br><span \
style="color:rgb(148,85,141)">self</span>.m_reply.error.connect(<span \
style="color:rgb(148,85,141)">self</span>.debugging)<br><span \
style="color:rgb(148,85,141)">self</span>.m_reply.finished.connect(<span \
style="color:rgb(148,85,141)">self</span>.debugging)<br></pre><pre \
style="color:rgb(0,0,0);font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt">..</pre><pre \
style="color:rgb(0,0,0);font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt"><br></pre><pre \
style="color:rgb(0,0,0);font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt">where debugging is a slot</pre><pre \
style="color:rgb(0,0,0);font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt"><pre style="font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt">@<span \
style="color:rgb(0,0,178)">pyqtSlot</span>()<br><span \
style="color:rgb(0,0,128);font-weight:bold">def </span>debugging(<span \
style="color:rgb(148,85,141)">self</span>):<br>    <span \
style="color:rgb(0,0,128)">print</span>(<span \
style="color:rgb(0,128,128);font-weight:bold">&quot;downloadProgress&quot;</span>)</pre><pre \
style="font-family:&quot;dejavu sans mono&quot;;font-size:11.4pt"><br></pre><pre \
style="font-family:&quot;dejavu sans mono&quot;;font-size:11.4pt">Problem is, it \
looks as if the readyRead, error or finished signal are never emitted. What am I \
doing wrong?</pre><pre style="font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt"><br></pre><pre style="font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt">Thanks, Christopher</pre></pre><pre \
style="color:rgb(0,0,0);font-family:&quot;dejavu sans \
mono&quot;;font-size:11.4pt"><br></pre></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

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

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