Passing the parent into the superclass init() should be the same thing as
calling setParent() directly after.


On Friday, December 21, 2012, kim bourdette wrote:

> Den torsdagen den 20:e december 2012 kl. 17:35:43 UTC+1 skrev DayDreamer:
> > Hi, i have created an Ui in PySide and passing maya's main window as
> parent window for Ui but when i am calling the loader.load method of
> PySide, it attaches the Ui window to maya window and the whole Ui shrinks.
> >
> > Kindly Help
> >
> > Thanks
>
> Hey! I might have the solution. I ran in to a similar problem when adding
> PyQt to Motionbuilder. The problem i had was that i only parented the child
> object when parenting to the motionbuilder window.
>
> #This code works because the parent is set in the super()__init__()
> function
> class PyQtUI(base_class, form_class):
>     def __init__(self, parent=getMainWindow()):
>         super(base_class, self).__init__(parent)
>
> #When i did something like this it didnt work because then you're not
> setting the window parent. Only the stuff in the widget. I think that's how
> it worked! Was a while ago :)
> class PyQtUI(base_class, form_class):
>     def __init__(self)):
>         super(base_class, self).__init__()
>         self.parent(getMainWindow())
>
> #Also getMainWindow() is my function, not a builtin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To post to this group, send email to 
> [email protected]<javascript:;>
> .
> To unsubscribe from this group, send email to
> [email protected] <javascript:;>.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].


Reply via email to