[PyKDE] automatic slots and subclassing

Phil Thompson phil at riverbankcomputing.co.uk
Fri Jan 27 19:31:54 GMT 2006


On Thursday 26 January 2006 6:26 pm, Andreas Pakulat wrote:
> 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)?

Should be fixed in tonight's snapshot.

Phil




More information about the PyQt mailing list