[Qgis-developer] QGIS pyqt Dockwidget plugin with pushButton

m roy royroge at outlook.com
Mon Nov 30 04:10:18 PST 2015


Hi,

i'm trying to setup a dock widget python plugin,

using the plugin builder i managed to setup the plugin
and now i need to execute a query:


def execute_query:
      connection_parameres = connpar
      defineQuery = "SELECT attribute FROM mytable"
      cursor.execute(defineQuery)
      ...etc

now i need to execute the method when a pushButton is clicked
this below works with a "regular" Dialog plugin but not with a 
dockwidget plugin:

(queryPush is a QT pushButton)

self.dlg.queryPush.clicked.connect(self.execute_query)

some help or link to code example ?

thanks, Roy.



More information about the Qgis-developer mailing list