I had to correct the syntax to:

as_ptr = long(shiboken.getCppPointer(orig)[0])

But it didn't crash for me. This is with the latest brew install of PySide
on osx



On Fri, Mar 7, 2014 at 6:45 AM, Danny Wynne <[email protected]> wrote:

> I'm wondering if anyone else has experienced this and has a work around?
> Maybe I need to recompile shiboken?
> thanks,
> example
>
> import PySide.QtGui as QtGui
> import shiboken
> orig = QtGui.QWidget() #Generic QWidget we want to cast
> as_ptr = long(shiboken.getCppPointer(orig))
> casted = shiboken.wrapInstance(as_ptr, QtGui.QLineEdit)
>
> thanks,
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/91a83722-eb6e-4fe3-a1b8-2b05f5ac78c2%40googlegroups.com<https://groups.google.com/d/msgid/python_inside_maya/91a83722-eb6e-4fe3-a1b8-2b05f5ac78c2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0%3DbwLUBYcS4c24ndMf387Tt2G4Fao%2BG-AmzX5TFQ%2B-Vw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to