I am working with python plugins for QGIS.I developed my plugin and inorder to incooperate the same into QGIS i copied the folder in
C:\Documents and Settings\comp90\.qgis\python\plugins
I opened my QGIS exe and installed the same.It is shown under **Databases-->PG & SL. My code is as follows:
SUPPORTED_CONNECTORS = {'postgis':'1.5', 'spatialite':'1.6'}
MISSED_CONNECTORS = []
def listDatabases(self):
actionsDb = {}
actions = DbConnection.ConnectionManager.getAvailableConnections()
for a in actions:
actionsDb[ unicode(a.text()) ] = a
return actionsDb
def getAvailableConnections(self, conntypes=None):
if conntypes == None:
conntypes = ConnectionManager.SUPPORTED_CONNECTORS.keys()
if not hasattr(conntypes, '__iter__'):
conntypes = [conntypes]
connections = []
for c in conntypes:
connection = self.getConnection( c )
connections.extend( connection.getAvailableConnections() )
return connections
def getAvailableConnections(self):
connections = []
settings = QSettings()
settings.beginGroup( "/%s/connections" % self.getSettingsKey() )
keys = settings.childGroups()
for name in keys:
connections.append( Connection.ConnectionAction(name, self.getTypeName()) )
settings.endGroup()
return connections
but the actionsDb is blank.In QGIS connection is established.When i try to open plugin in QGIS ,it does not open because actionsDb is blank.What can be the problem??
