[Qgis-developer] Re: qWebView in a plugin - the windows closes immediately

baobazz baobazz at hotmail.fr
Wed May 12 06:00:56 EDT 2010


hello Martin

Thanks a lot for your answer!

For those whore interested, here is run() function code.

The plugin gets the layer name and uses it to display metadata information
about it from an internal web window.

  def run(self):
    #code to get the layer_id
    sourceL=self.iface.activeLayer().source().split("/")
    table=sourceL[sourceL.count()-1].split(".")[0]
##  QMessageBox.information(None,"couche",str(table))

    #SQL
    fichier="C:/georep2B.sqlite"
    conn=sqlite3.connect(fichier)
    c=conn.cursor()
    c.execute("select id from georep where nomCouche='"+str(table)+"'")
    id=c.fetchone()[0]
    
    self.view=QWebView()
    url="http://info_layer.php?layer="="+str(id)
    self.view.load(QUrl(url))
    self.view.show()


-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/qWebView-in-a-plugin-the-windows-closes-immediately-tp5036265p5040395.html
Sent from the qgis-developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list