[PyKDE] PyKDE: bug with KRecentFilesAction?

Serge Weinstock sweinst at ukonline.co.uk
Fri Jul 7 20:06:05 BST 2006


Is there a bug with KRecentFilesAction?

I'm creating a KRecentFilesAction like this:

class MyMainWindow(KMainWindow)
    ...
    def initActions(self):
       ...
       self.openRecentFilesAction = KRecentFilesAction(i18n("Open
&Recent File"), KShortcut(),
            self.openURL, acts, "openRecentFilesAction")

       ...

    def openURL(self, url):
       ...

When I select an entry in the recent file list, I got a:

TypeError: openURL() takes exactly 2 arguments (1 given)

The documentation says that the slot signature should be
urlSelected(const KURL &)

I get the same if I do a:
        self.connect(self.openRecentFilesAction,
SIGNAL("urlSelected(const KURL &)"), self.openURL)


Is it a bug or have I done something wrong?

Serge




More information about the PyQt mailing list