I'm working on a Qgis plugin with python,
I'm creating a feature and I show a feature form to edit the attributes. But after the openFeatureForm
function call the program crash and close
line = QgsFeature()
line.setGeometry(QgsGeometry.fromPolyline(transformedLine))
pr = parcoursLayer.dataProvider()
pr.addFeatures([line])
qgis.utils.iface.openFeatureForm(parcoursLayer,line)