[PyQt] [PyKDE4] Default value for the second argument of
KAction.setShortcut() does not seem to work
Adeodato Simó
dato at net.com.org.es
Fri Jan 11 12:31:43 GMT 2008
Hello again, Simon.
This one time, I'm finding that KAction.setShortcut() can't work in
Python without passing a value for the second argument, whereas this
works in C++. Any chance you'd know why? Thanks.
This:
-8<-
#! /usr/bin/env python
from PyKDE4 import kdeui
action = kdeui.KAction(None)
action.setShortcut(kdeui.KShortcut('Ctrl+F'))
->8-
raises:
TypeError: insufficient number of arguments to KAction.setShortcut()
But this compiles fine:
-8<-
#include <kaction.h>
#include <kshortcut.h>
int main (int argc, char *argv[])
{
KAction *action = new KAction(NULL);
action->setShortcut(KShortcut("Ctrl+F"));
}
->8-
--
Adeodato Simó dato at net.com.org.es
Debian Developer adeodato at debian.org
Listening to: Placebo - Ask For Answers
More information about the PyQt
mailing list