On Tuesday 21 April 2009 18:14:14 you wrote:
> Don't you need to open the device for reading before passing it to QImage ?
> For me, just adding:
> iop.open(QIODevice.ReadOnly)
> makes everything work fine.

Thanks, you're right, that did the trick. The source of my confusion was the 
following paragraph in the QImageReader docs:

If the device is not already open, QImageReader will attempt to open the 
device in QIODevice.ReadOnly mode by calling open(). Note that this does not 
work for certain devices, such as QProcess, QTcpSocket and QUdpSocket, where 
more logic is required to open the device.

So, this behaviour is not something to be relied on (not sure if this is a 
quiestion of Qt, PyQt or a documentation error).
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to