[PyKDE] automatic slots and subclassing

Andreas Pakulat apaku at gmx.de
Thu Jan 26 18:26:53 GMT 2006


Hi,

another thing I found with automatic slots: It seems they do not work
when subclassing:

class parentWidget(QtGui.QWidget):
	def __init__(self):
		QtGui.QWidget.__init__(self)
	def on_pushButton_clicked(self, checked = None):
		print "tst"

class myWidget(parentWidget, compileToType("test.ui")):
	def __init__(self):
		parentWidget.__init__(self)
		self.setupUi(self)

compileToType produces a type from the .ui-file... 

The "slot" on_pushButton_clicked is not called, though the same thing
works in C++.

Is this also due to some magic stuff moc does, or is this just something
that doesn't work (yet)?

Andreas

-- 
Your life would be very empty if you had nothing to regret.




More information about the PyQt mailing list