Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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??

share|improve this question
    
I'm a bit confused. Are you having trouble with RT Sql Layer or with your own plugin? –  underdark Feb 16 '12 at 9:09
1  
For this kind of problems try also the qgis-developer mailing list. –  Giovanni Manghi Feb 16 '12 at 9:10
    
@underdark---With my own plugins.... –  Poonam Narvekar Feb 16 '12 at 9:29
    
I don't think we can help without seeing your code. –  underdark Feb 16 '12 at 17:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.