[PyQt] PyQt/SIP snapshots
David Boddie
david at boddie.org.uk
Wed Apr 1 23:47:31 BST 2009
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_())
David
More information about the PyQt
mailing list