Adding a PyQGIS Plugin to the Database Menu

المشرف العام

Administrator
طاقم الإدارة
I am developing a plugin which I would like to add to the Database menu instead of the default Plugins menu.

According to the PyQGIS Developer Cookbook all I have to do is add

category=Databaseto my plugin's metadata.txt.

However, that does not have any effect. Do I have to add something in my initGui as well?

Currently the initGui looks like this:

def initGui(self): self.importCSV_action = QAction('Import CSV', self.iface.mainWindow()) QtCore.QObject.connect(self.importCSV_action, QtCore.SIGNAL("activated()"),self.importCSV) self.iface.addPluginToMenu('xxx', self.importCSV_action)If I leave the category=Database out in my metadata.txt the plugin appears as expected in the Plugins menu.



أكثر...
 
أعلى