Hi everyone,
I've got a really simple main window with a few (QPushButton) buttons. What I want to do, is no matter what button has focus, hitting "Enter" will hit the default button. Rather than connecting a signal on every button to the default button's slot, I've decided to setup a hot key, child of the main window:
self.shortcutKey = QAccel(self)
id = self.shortcutKey.insertItem(Qt.Key_Enter)
self.shortcutKey.connectItem(id, self.defaultButton, SLOT(self.defaultButton.clicked()))
However as soon as I invoke connectItem() it appears that the defaultButton's slot is activated. I've tried a number of ways to get around this but no luck.
Does anyone know what I may be doing wrong? Maybe I'm not understanding QAccel's abilities?
Btw, I'm on python/qt 3.3... any help would be greatly appreciated. Thanks!
- alfred
_______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
