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

List:       pykde
Subject:    Re: [PyQt] QHttpMultiPart impossible to use
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2012-06-20 13:04:45
Message-ID: edb2c3e08876047925c93a9f77c5a20c () localhost
[Download RAW message or body]

On Tue, 19 Jun 2012 18:10:31 -0700, Doogster <thedoogster@gmail.com>
wrote:
> How does one use PyQt's QHttpMultiPart and QHttpPart classes?
> 
> On both Arch Linux (PyQt 4.9) and Windows (4.8.1, I believe), the
> attached code sample segfaults the Python interpreter.

As has been pointed out you need to keep a reference to the QHttpMultiPart
object (or give it a parent).

> While Qt's QNetworkAccessManager::post() method is overloaded to take
> a pointer to a QHttpMultiPart, PyQt's QNetworkAccessManager.post()
> method only has overloads to take either a QByteArray or a QIODevice.

If this was true then you would get a type exception when running your
script.

> Therefore, it does not appear to be possible to use a PyQt
> QHttpMultiPart instance the way it was intended to be used.
> 
> Finally, the current PyQt Class Reference does not mention the
> QHttpMultiPart and QHttpPart classes.

That will be fixed in the next release.

> What's going on? Is this a bug in PyQt?

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://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