[PyQt] slots don't get called
Peter Bienstman
Peter.Bienstman at ugent.be
Sat Sep 19 18:35:29 BST 2009
Hi,
I have a rather strange problem with 4.5.4, in the sense that none of my
QAction slots get called under Windows. Under Linux with 4.4.4, the same
program runs fine...
Is there anything that could cause this?
My ui file has code like
<connection>
<sender>actionAddCards</sender>
<signal>activated()</signal>
<receiver>MainWindow</receiver>
<slot>add_cards</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>164</x>
<y>226</y>
</hint>
</hints>
</connection>
which gets translated into
QtCore.QObject.connect(self.actionAddCards,
QtCore.SIGNAL("activated()"), MainWindow.add_cards)
I tried doing the connect code in my own code MainWindow, but that did not
make a difference:
self.connect(self.actionAddCards, QtCore.SIGNAL("activated()"),
self.add_cards)
Peter
More information about the PyQt
mailing list