[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Help with segfault in PyQt program
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2012-09-18 23:10:59
Message-ID: a44ce42957213f9eaa1c57cb270f71fa () localhost
[Download RAW message or body]
On Tue, 18 Sep 2012 00:30:12 +0530, Shriramana Sharma <samjnaa@gmail.com>
wrote:
> Hi thanks for that fix. I had to polish my concepts of what Python
> variables are before I could fathom this correctly:
>
http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#other-languages-have-variables
>
> Anyhow, I have now further developed the program some and added some
> formulae which involves stuff like 3*C1 etc but I am getting thrown an
> error saying that I cannot multiply an int and a QPointF but curiously
> I can multiply a QPointF and int in that order:
>
>>>> from PyQt4.QtCore import QPointF
>>>> QPointF(1,1)
> PyQt4.QtCore.QPointF(1.0, 1.0)
>>>> QPointF(1,1)*2
> PyQt4.QtCore.QPointF(2.0, 2.0)
>>>> 2*QPointF(1,1)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> TypeError: unsupported operand type(s) for *: 'int' and 'QPointF'
>>>>
>
> Why is this? Thanks.
The relevant C++ operator wasn't wrapped for some reason. Fixed in
tonight's snapshot.
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