View Single Post
Posts: 2 | Thanked: 0 times | Joined on Sep 2010
#1
Hi,
I'm fairly new to both Python and Qt4, so I'd like a few pointers to find out what my problem is.

The problem is that some QPushButtons won't signal the slots they're connected to when clicked, when running the program on my n900. When running the same program under Ubuntu 9.10 or 10.4, the method will execute without problems.

To add to the weirdness, the problem only affects some of the buttons, not all.

Code:
# this does NOT work:
self.b1[i]  = QtGui.QPushButton(self.quickButtons[i])
self.ds1[i] = Roller()
self.connect(self.b1[i],QtCore.SIGNAL('clicked()'),self.ds1[i].rollSlot)
Code:
# this WORKS:
self.throw_b  = QtGui.QPushButton("Throw")
self.connect(self.throw_b,QtCore.SIGNAL('clicked()'),self.genericRoll)
Any pointers on how I should debug this would be greatly appreciated. The only relevant difference I can think of is that n900 has Python2.5, whereas Ubuntu ships Python2.6.

OTOH, the new-style connect() (second example) does work... I am using the new-style connect(), am I not?