[PySide] Passing parameter from one class to an external function

Frank Rueter | OHUfx frank at ohufx.com
Thu Apr 5 06:54:38 CEST 2012

Not sure if I follow (I'm new to PySide myself).
Your "greetings" function is outside the "Form" class, yet it takes the 
argument "self" and tries to call "self.edit.text()" which is unknown 
outside of the "Form" class.
Hence my suggestion to simply increase the indentation of the function 
to make it a method to the class and things will fall into place:

On 4/5/12 1:27 PM, craf wrote:
>> just indent your "greetings" function so it becomes a method to the
>> "Form" class, then it will work.
> Hi Frank.
> Thanks for your response, but the code is fine.
> The function is outside the class, and I need to call it from within. In
> WxWidget and Pygtk can be done, but I've failed PySide.
> Any suggestions?
> Regards,
> Cris
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside

More information about the PySide mailing list