Hi,

i am having trouble with MQtUtil.getParent(), MQtUtil.fullname(), and
all of the maya.OpenMayaUI.MQtUtil functions that require a pointer to
a QObject.

i think it -may- have to do with sip but not really sure. possibly i
have an incompatible sip installed.. or something?

my environment is:
windows 7 64bit
maya 2011 64bit.
PyQt4 v4.7.3 for 64 bit

i import all this stuff:

import maya.OpenMayaUI as mui
import sip
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.uic import *

i have a UI up in maya that i generated with designer, and bring in
with the uic module
when ever i try to use sip to send pointers to QObjects in my UI to
MQUtil..., MQUtil always chokes on the pointer arg.

pointer = sip.unwrapinstance(myQObject)
print "type = %s\n"%type(pointer)
print "pointer = %s\n"%pointer

>> long
>> 431391664

pointer = sip.unwrapinstance(myQObject)
parentPointer = mui.MQtUtil.getParent(pointer)

>> # TypeError: in method 'MQtUtil_getParent', argument 1 of type 'QObject 
>> const *' #


pointer = sip.unwrapinstance(myQObject)
windowString = mui.MQtUtil.fullName(pointer)

>> # TypeError: in method 'MQtUtil_getParent', argument 1 of type 'QObject 
>> const *' #

I hope that it is just some rookie mistake on my part... that i am
just not using sip correctly or not passing the args to MQUtil
correctly, but after looking at numerous examples of using sip and
MQUtil on line,  it looks like i am passing the args correctly to
MQUtil..

i am getting a type long integer back from sip, and sending that long
integer to MQUtil, but MQUtil is having none of it.

im kind of stuck. any help would be appreciated!
thanks in advance.
-mark therrell







-- 
http://groups.google.com/group/python_inside_maya

Reply via email to