[PyQt] KGlobalAccel, again
Adeodato Simó
dato at net.com.org.es
Fri Aug 3 19:50:42 BST 2007
Hello.
I'm having the same problem as [1] when using KGlobalAccel. In a
nutshell, the program crashes when pressing the configured global
shortcut.
[1] http://www.riverbankcomputing.com/pipermail/pyqt/2006-May/013268.html
I tried adding /Transfer/ to the KGlobalAccel constructor as suggested
there, but the result is the same (patched the PyKDE version in Debian,
3.15.2+20060422; 3.16.0 gave me a compiler error when building).
I would really really really like to see this fixed. If there's anything
I can do to help with that, please let me know.
Here's a sample program that shows the issue: run it and press Ctrl-Alt-U.
---------------------
import sys
import kdeui
import kdecore
def main():
application = kdecore.KApplication(sys.argv, 'test app')
main_window = MainWindow(None, 'main window')
main_window.show()
application.exec_loop()
class MainWindow(kdeui.KMainWindow):
def __init__ (self, *args):
kdeui.KMainWindow.__init__(self, *args)
self.global_accel = kdecore.KGlobalAccel(self)
self.global_accel.insert('action', 'Action', '',
kdecore.KShortcut('Ctrl+Alt+U'), kdecore.KShortcut(),
self.slot_action)
self.global_accel.updateConnections()
def slot_action(self):
print "Inside slot_action()"
if __name__ == '__main__':
main()
---------------------
--
Adeodato Simó dato at net.com.org.es
Debian Developer adeodato at debian.org
And how do you tell an extroverted mathematician? He looks at *your* shoes
while he's talking to you.
More information about the PyQt
mailing list