[PyQt] Odd QImage behavior
Matt Smith
melkor at orangepalantir.org
Thu Jan 29 19:03:50 GMT 2009
On Thu, 2009-01-29 at 15:37 +0000, pyqt-request at riverbankcomputing.com
wrote:
>> I think that is the problem for two reasons. First it depends on the
>> size of the array, and Second the .ndarray part is left off of first
>> example, and doesn't change anything when I include it.
>You're just setting an attribute on the object. Was there a guide
>somewhere that said you have to do that?
Yeah, it was suggested from PyQwt folks and recently again by somebody
on this list.
http://paste.pocoo.org/show/101918/
>Strange. I'm assuming that the data had the expected size. Without
>access to the data, it's difficult to track down the bug, though. I
>guess you or I could create a simple test case with a numpy array. Do
>you want to give it a try?
This test case makes two numpy arrays puts a vertical stripe and then
creates QImages. Change either dimension to 101 instead of 100 and the
image doesn't get painted properly.
http://paste.pocoo.org/show/101921/
thanks
mbs
More information about the PyQt
mailing list