You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to everyone involved in creating PythonQt, being able to glue Qt/Python/OGL together is an absolute godsend for productivity :)
Anyway, I found an issue and thankfully was able to diagnose the cause. For all 'number' type objects wrapped by PythonQt (e.g QVector3D), the standard operators for '+', '-' an d'' are set up incorrectly - they are set to the 'in-place' versions '+=', '-=' and '=' instead, so for example:
print str( vecA + vecB )
...will actually execute this:
print str( vecA += vecB )
...so the value of vecA will unexpectedly change!
The erroneous code is in initializeSlots() in PythonQtClassWrapper.cpp.
The fix is trivial (just replace an instance of 'nb_add' with 'nb_inplace_add', etc), but I'm not sure what the rules/procedures are for updating the PythonQt code.
FYI I am using the latest code, downloaded from here:
Hi!
Thanks to everyone involved in creating PythonQt, being able to glue Qt/Python/OGL together is an absolute godsend for productivity :)
Anyway, I found an issue and thankfully was able to diagnose the cause. For all 'number' type objects wrapped by PythonQt (e.g QVector3D), the standard operators for '+', '-' an d'' are set up incorrectly - they are set to the 'in-place' versions '+=', '-=' and '=' instead, so for example:
...will actually execute this:
...so the value of vecA will unexpectedly change!
The erroneous code is in initializeSlots() in PythonQtClassWrapper.cpp.
The fix is trivial (just replace an instance of 'nb_add' with 'nb_inplace_add', etc), but I'm not sure what the rules/procedures are for updating the PythonQt code.
FYI I am using the latest code, downloaded from here:
Hope this is helpful!
iestyn
The text was updated successfully, but these errors were encountered: