[PyKDE] bugs using PyKDE

Mathieu Bouchard mbouchar at bioinfo.ulaval.ca
Mon Oct 3 21:17:44 BST 2005


Hi,

I'm using a recent menu in one of my apps
It is created with :
    ac = self.actionCollection()
    ...
    self.OpenRecent = KStdAction.openRecent(self.__slotOpenRecent_, ac)

the slot is :
    def fileOpenRecent(self, url):
        if self.__checkModified_():
            self.mar_editor.openArchive(url)
            self.__file_choosed_ = url

In the KDE documentation, 
(http://developer.kde.org/documentation/library/3.4-api/kdeui/html/namespaceKStdAction.html#a68
) it is written : "The signature of the slot being called is of the form 
slotURLSelected( const KURL & )" but the signal received seems to be 
slotURLSelected() in PyKDE, because I'm never receiving any URL.

To make it working, I have to use the following code :
    self.OpenRecent = KStdAction.openRecent(self, PYSIGNAL(""), ac)
    self.connect(self.OpenRecent, SIGNAL("urlSelected(const KURL&)"), 
                        self.fileOpenRecent)


The second problem I'm having is with KDockWidget and KDockMainWindow.
When creating the dock with :
   pix = QPixmap(16, 16)
   pix.fill()
   mainDock = win.createDockWidget("New Dock", pix, None, "main_dock_widget")
the application is crashing (KCrash)




More information about the PyQt mailing list