On Thu, 2 Apr 2009 00:47:31 +0200, David Boddie <da...@boddie.org.uk>
wrote:
> On Wednesday 01 April 2009, Phil Thompson wrote:
> 
>> Should be fixed with tonight's snapshots - though I don't have a test
>> case.
> 
> Here's something that might work to start with:
> 
> import sys
> from PyQt4.QtCore import QCoreApplication, QUrl
> from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkReply, 
> QNetworkRequest
> 
> class Test:
> 
>     def __init__(self):
>     
>         request = QNetworkRequest(
>             QUrl("http://www.riverbankcomputing.co.uk/news";))
>         self.manager = QNetworkAccessManager()
>         self.manager.finished.connect(self.handleReply)
>         self.manager.get(request)
>     
>     def handleReply(self, reply):
>     
>         print reply.error()
>         QCoreApplication.quit()
> 
> if __name__ == "__main__":
> 
>     app = QCoreApplication(sys.argv)
>     test = Test()
>     sys.exit(app.exec_())

Seems to work - thanks.

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

Reply via email to