[PyKDE] Connecting slots to functions in a different namespace

Tom Chance tomchance at gmx.net
Sat Mar 29 21:34:00 GMT 2003


I've got another problem that's come about by not wanting to create a new 
class for a dialogue box. Previously, I had a class for the dialogue which 
included a function connected to a button in the dialogue. Now that function 
isn't in that dialogue's class... it's in the namespace that is calling the 
class instance, e.g.:

def function1(self):
	do some stuff...
	instance = ClassName()

def function2(self):
	do some stuff...

How can I connect the button in ClassName() to function2()? Or am I forced to 
put the function in ClassName()?

Tom




More information about the PyQt mailing list