It appears the parent can not be of type QObject.

# Supported signatures:
#   PySide.QtGui.QWidget(*PySide.**QtGui.QWidget* = None,
PySide.QtCore.Qt.WindowFlags = 0)

Try this instead:
 mayaMainWindow = self.wrapinstance(long(ptr), QtCore.QWidget)


On Mon, Apr 15, 2013 at 12:48 PM, Christopher Evans
<[email protected]>wrote:

> Tried Widget, I get:
>
> # Error: 'PySide.QtGui.QWidget' called with wrong argument types:
> #   PySide.QtGui.QWidget(PySide.QtCore.QObject)
> # Supported signatures:
> #   PySide.QtGui.QWidget(PySide.QtGui.QWidget = None,
> PySide.QtCore.Qt.WindowFlags = 0)
>
> The object is <class 'cr.skinWrangler.skinWrangler'>, which is a widget or
> dialog, and the parent <PySide.QtCore.QObject object at 0x000000003D323588>
>
>
> On Mon, Apr 15, 2013 at 9:26 AM, Justin Israel <[email protected]>wrote:
>
>> What kind of object is the wrapper code returning? Have you tried using a
>> base class of QtGui.QWidget?
>>  On Apr 15, 2013 7:08 PM, "Christopher Evans" <[email protected]>
>> wrote:
>>
>>> @Justin: That's a custom wrapinstance like Nathan has here:
>>> http://nathanhorne.com/?p=485
>>>
>>> @Serguei: I get the same error whether I call the parent constructor or
>>> not
>>>
>>>
>>> On Mon, Apr 15, 2013 at 3:26 AM, Justin Israel 
>>> <[email protected]>wrote:
>>>
>>>> What is "self.wrapinstance" doing? If you are using sip, then that
>>>> would be for PyQt4 only.
>>>>
>>>>
>>>> On Mon, Apr 15, 2013 at 12:16 PM, Serguei Kalentchouk <
>>>> [email protected]> wrote:
>>>>
>>>>> I think PySide requires you to call the parent constructor directly:
>>>>> super (skinWrangler, self).__init__ (mayaMainWindow)
>>>>>
>>>>>
>>>>> On Sunday, April 14, 2013, Christopher Evans wrote:
>>>>>
>>>>>> I am getting this error, but the code looks kosher. It's complaining
>>>>>> that I am feeding it a PySide.QtGui.QDialog(), but this is what it says 
>>>>>> it
>>>>>> takes in the docs..
>>>>>>
>>>>>> # TypeError: 'PySide.QtGui.QDialog' called with wrong argument types:
>>>>>> #   PySide.QtGui.QDialog()
>>>>>> # Supported signatures:
>>>>>> #   PySide.QtGui.QDialog(PySide.QtGui.QWidget = None,
>>>>>> PySide.QtCore.Qt.WindowFlags = 0) #
>>>>>>
>>>>>> class skinWrangler(QtGui.QDialog):
>>>>>>     def __init__(self, parent=None):
>>>>>>         ptr = mui.MQtUtil.mainWindow()
>>>>>>         mayaMainWindow = self.wrapinstance(long(ptr), QtCore.QObject)
>>>>>>         QtGui.QDialog.__init__(self, parent=mayaMainWindow)
>>>>>>
>>>>>> --
>>>>>> CE
>>>>>>
>>>>>> --
>>>>>> 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 post to this group, send email to
>>>>>> [email protected].
>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Technical Director @ DreamWorks Animation
>>>>>
>>>>>  --
>>>>> 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 post to this group, send email to
>>>>> [email protected].
>>>>> 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 post to this group, send email to
>>>> [email protected].
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> CE
>>>
>>> --
>>> 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 post to this group, send email to [email protected]
>>> .
>>> 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 post to this group, send email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> CE
>
> --
> 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 post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Technical Director @ DreamWorks Animation

-- 
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to