I am creating my plugin in QGIS. In file name.py under run I have
self.dlg.show()result = self.dlg.exec_()if result: call_my_function()And my_function ends like this
error = QgsVectorFileWriter.writeAsVectorFormat(layer, "/home/Aerov/name_of_result.shp", "CP1250", None,"ESRI Shapefile")if error == QgsVectorFileWriter.NoError: print "Success"else: print "Fail"returnI also tried it without return.Everything works great, file is always created, but it also ends the whole QGIS. I would like to continue working in QGIS after my plugin ends. Am I forgeting something?
أكثر...
self.dlg.show()result = self.dlg.exec_()if result: call_my_function()And my_function ends like this
error = QgsVectorFileWriter.writeAsVectorFormat(layer, "/home/Aerov/name_of_result.shp", "CP1250", None,"ESRI Shapefile")if error == QgsVectorFileWriter.NoError: print "Success"else: print "Fail"returnI also tried it without return.Everything works great, file is always created, but it also ends the whole QGIS. I would like to continue working in QGIS after my plugin ends. Am I forgeting something?
أكثر...